|
@@ -264,7 +264,7 @@ const totalCarriersNum = ref(0);
|
|
|
const detailInfo = ref({});
|
|
|
const loadingCarrier = ref(false);
|
|
|
const carriers = ref([]);
|
|
|
-const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
|
+const details = ref([])
|
|
|
const form = ref({});
|
|
|
// const formatDetails = ref([])
|
|
|
const currentDetail = ref({});
|
|
@@ -305,6 +305,8 @@ function getForm() {
|
|
|
loading.value = true;
|
|
|
getOrder(form.value.id).then((response) => {
|
|
|
form.value = response.data;
|
|
|
+ details.value = proxy.deepClone(response.data.details);
|
|
|
+ console.log(details.value)
|
|
|
//如果发出单明细里收回单,主表除了备注之外不能编辑
|
|
|
form.value.details.forEach((item) => {
|
|
|
item.hasReturnReceiptDetailFlag = true
|
|
@@ -803,8 +805,16 @@ const handleShowDialogProcesses = (row) => {
|
|
|
|
|
|
// 工序选择带回
|
|
|
const handleMultipleSelectedProcesses = (selection) => {
|
|
|
- currentDetail.value.processes = []
|
|
|
- console.log(selection);
|
|
|
+ let currentOriginal = details.value.filter(item =>item.id = currentDetail.value.id)
|
|
|
+ let flag = true;
|
|
|
+ if(currentDetail.value.returnReceiptDetailList.length>0 && currentDetail.value.returnReceiptDetailList[0].isAudit == 1 ){
|
|
|
+selection.forEach(item=>{
|
|
|
+ if(currentOriginal[0].processes.findIndex((info)=>info.processStepNumber==item.processStepNumber)<0){
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+})
|
|
|
+ }
|
|
|
+ if(flag){
|
|
|
const processNames = selection.sort((a, b) => a.processStepNumber - b.processStepNumber).map((item) => item.processAlias);
|
|
|
// 使用join方法将数组转换为以逗号分隔的字符串
|
|
|
let commaSeparatedString = processNames.join(",");
|
|
@@ -820,6 +830,9 @@ const handleMultipleSelectedProcesses = (selection) => {
|
|
|
};
|
|
|
currentDetail.value.processes.push(newProcess);
|
|
|
});
|
|
|
+}else{
|
|
|
+ proxy.$modal.msgError("德迈仕已收回,不可添加新工序");
|
|
|
+}
|
|
|
};
|
|
|
|
|
|
/** 暴露给父组件的方法 */
|