|
|
@@ -413,31 +413,29 @@ const _list = ref('');
|
|
|
|
|
|
//查询
|
|
|
const add_onSubmit = async ()=>{
|
|
|
-
|
|
|
+
|
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
|
|
|
const WorkListdata = [];
|
|
|
- add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
|
+ // add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
|
jdhz_tableData.splice(0,jdhz_tableData.length,...WorkListdata);
|
|
|
ElMessage({type: 'warning',message: '搜索内容不能为空' })
|
|
|
return;
|
|
|
}
|
|
|
// 如果没有以"DC"开头,自动补充添加DC
|
|
|
if (!add_searchInfo.value.startsWith('DC')) {
|
|
|
-
|
|
|
add_searchInfo.value = 'DC' + add_searchInfo.value;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
sizeDatas.length = 0;
|
|
|
-
|
|
|
_order.value = add_searchInfo.value;
|
|
|
//进度汇总表格数据
|
|
|
const getSpotLists = await getSpotList({order:_order.value,code:_code});
|
|
|
+
|
|
|
if(getSpotLists.data.total === 0){
|
|
|
ElMessage({type: 'warning',message: '此订单未出库,请先出库' })
|
|
|
return false
|
|
|
}
|
|
|
+ console.log('查询数据',getSpotLists.data)
|
|
|
setTimeout(() => {
|
|
|
const inputElement = document.getElementById('scs1');
|
|
|
if (inputElement) {
|
|
|
@@ -446,8 +444,9 @@ const add_onSubmit = async ()=>{
|
|
|
}, 100);//100毫秒
|
|
|
|
|
|
sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers);
|
|
|
- add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.table);
|
|
|
- jdhz_tableData.splice(0, jdhz_tableData.length, ...getSpotLists.data.rows);
|
|
|
+ // add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.list);
|
|
|
+ jdhz_tableData.splice(0, jdhz_tableData.length, ...getSpotLists.data.table);
|
|
|
+ console.log('上方数据',jdhz_tableData)
|
|
|
|
|
|
//技术附件
|
|
|
const searchValue = add_searchInfo.value.split('-')[0];
|
|
|
@@ -455,19 +454,19 @@ const add_onSubmit = async ()=>{
|
|
|
jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
|
|
|
|
|
|
_list.value = getSpotLists.data.list
|
|
|
- _UniqId.value = getSpotLists.data.list[0].UniqId
|
|
|
+ _UniqId.value = getSpotLists.data.list.UniqId
|
|
|
|
|
|
const keys1 = ['cm1', 'cm2', 'cm3', 'cm4','cm5','cm6','cm7','cm8','cm9','cm10',];
|
|
|
const keys2 = ['cmsl1', 'cmsl2', 'cmsl3', 'cmsl4','cmsl5','cmsl6','cmsl7','cmsl8','cmsl9','cmsl10','zdtotal',];
|
|
|
if(_order.value.includes('-')){
|
|
|
for (let key of keys1) {
|
|
|
- if (getSpotLists.data.list[0].hasOwnProperty(key)) { // 确保键存在于对象中
|
|
|
- cmformdata[key] = getSpotLists.data.list[0][key];
|
|
|
+ if (getSpotLists.data.list.hasOwnProperty(key)) { // 确保键存在于对象中
|
|
|
+ cmformdata[key] = getSpotLists.data.list[key];
|
|
|
}
|
|
|
}
|
|
|
for (let key of keys2) {
|
|
|
- if (getSpotLists.data.list[0].hasOwnProperty(key)) { // 确保键存在于对象中
|
|
|
- cmslformdata[key] = getSpotLists.data.list[0][key];
|
|
|
+ if (getSpotLists.data.list.hasOwnProperty(key)) { // 确保键存在于对象中
|
|
|
+ cmslformdata[key] = getSpotLists.data.list[key];
|
|
|
}
|
|
|
}
|
|
|
|