From 266e4bf654c55ce2f7e9271048e4625f1b8b49f6 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期一, 29 十二月 2025 14:36:08 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js | 703 ++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 435 insertions(+), 268 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
index 860af89..6fa1f60 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
@@ -3,7 +3,6 @@
import http from '@/api/http.js'
import { h, createVNode, render, reactive, ref } from 'vue';
import { ElDialog, ElForm, ElFormItem, ElInput, ElButton, ElMessage, ElSelect, ElOption } from 'element-plus';
-
import gridBody from './extend/outOrderDetail.vue'
import gridHeader from './extend/NoStockOut.vue'
import gridFooter from './extend/EmptyTrayOutbound.vue'
@@ -48,260 +47,260 @@
});
}
}, */
- {
- name: '绌烘墭鐩樺嚭搴�',
- type: 'primary',
- value: '绌烘墭鐩樺嚭搴�',
- onClick: function () {
+ // {
+ // name: '绌烘墭鐩樺嚭搴�',
+ // type: 'primary',
+ // value: '绌烘墭鐩樺嚭搴�',
+ // onClick: function () {
- const platformOptions = Array.from({ length: 1 }, (_, i) => {
- const num = 1;
- return { label: `绔欏彴${num}`, value: `1-2` };
- });
+ // const platformOptions = Array.from({ length: 1 }, (_, i) => {
+ // const num = 1;
+ // return { label: `绔欏彴${num}`, value: `1-2` };
+ // });
- const quantityOptions = Array.from({ length: 6 }, (_, i) => ({
- label: (i + 1).toString(),
- value: i + 1
- }));
+ // const quantityOptions = Array.from({ length: 6 }, (_, i) => ({
+ // label: (i + 1).toString(),
+ // value: i + 1
+ // }));
- const warehouseOptions = ref([]);
- const isLoadingWarehouses = ref(false);
+ // const warehouseOptions = ref([]);
+ // const isLoadingWarehouses = ref(false);
- const getWarehouseList = async () => {
- isLoadingWarehouses.value = true;
- try {
- const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes');
- if (status && Array.isArray(data)) {
- // 鏍煎紡鍖栦粨搴撻�夐」锛氶�傞厤ElSelect鐨刲abel-value鏍煎紡
- warehouseOptions.value = data.map(item => ({
- label: item.locationTypeDesc,
- value: item.locationType
- }));
- } else {
- ElMessage.error('鑾峰彇鍖哄煙鍒楄〃澶辫触');
- warehouseOptions.value = [];
- }
- } catch (err) {
- ElMessage.error('鍖哄煙鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
- warehouseOptions.value = [];
- } finally {
- isLoadingWarehouses.value = false;
- }
- };
+ // const getWarehouseList = async () => {
+ // isLoadingWarehouses.value = true;
+ // try {
+ // const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes');
+ // if (status && Array.isArray(data)) {
+ // // 鏍煎紡鍖栦粨搴撻�夐」锛氶�傞厤ElSelect鐨刲abel-value鏍煎紡
+ // warehouseOptions.value = data.map(item => ({
+ // label: item.locationTypeDesc,
+ // value: item.locationType
+ // }));
+ // } else {
+ // ElMessage.error('鑾峰彇鍖哄煙鍒楄〃澶辫触');
+ // warehouseOptions.value = [];
+ // }
+ // } catch (err) {
+ // ElMessage.error('鍖哄煙鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
+ // warehouseOptions.value = [];
+ // } finally {
+ // isLoadingWarehouses.value = false;
+ // }
+ // };
- const mountNode = document.createElement('div');
- document.body.appendChild(mountNode);
+ // const mountNode = document.createElement('div');
+ // document.body.appendChild(mountNode);
- const formData = reactive({
- warehouseCode: '',
- palletCode: '',
- selectedPlatform: platformOptions[0].value,
- quantity: 1
- });
+ // const formData = reactive({
+ // warehouseCode: '',
+ // palletCode: '',
+ // selectedPlatform: platformOptions[0].value,
+ // quantity: 1
+ // });
- const vnode = createVNode(ElDialog, {
- title: '绌烘墭鐩樺嚭搴�',
- width: '500px',
- modelValue: true,
- appendToBody: true,
- onOpened: async () => {
- await getWarehouseList();
- const inputRef = vnode.component.refs.boxCodeInput;
- inputRef?.focus();
- },
- 'onUpdate:modelValue': (isVisible) => {
- if (!isVisible) {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- }
- },
- style: {
- padding: '20px 0',
- borderRadius: '8px'
- }
- }, {
- default: () => h(ElForm, {
- model: formData,
- rules: {
- warehouseCode: [
- { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
- ],
- palletCode: [
- { type: 'string', message: '鏂欑鍙峰繀椤讳负瀛楃涓�', trigger: 'blur' }
- ],
- selectedPlatform: [
- { required: true, message: '璇烽�夋嫨鍑哄簱绔欏彴', trigger: 'change' }
- ],
- quantity: [
- { required: true, message: '璇烽�夋嫨绌虹鏁伴噺', trigger: 'change' }
- ]
- },
- ref: 'batchOutForm',
- labelWidth: '100px',
- style: {
- padding: '0 30px',
- }
- },
- [
- // h(ElFormItem, {
- // label: '浠撳簱鍖哄煙',
- // prop: 'warehouseCode',
- // style: {
- // marginBottom: '24px'
- // }
- // }, [
- // h(ElSelect, {
- // placeholder: '璇烽�夋嫨浠撳簱鍖哄煙',
- // modelValue: formData.warehouseCode,
- // 'onUpdate:modelValue': (val) => {
- // formData.warehouseCode = val;
- // },
- // style: {
- // width: '100%',
- // height: '40px',
- // borderRadius: '4px',
- // borderColor: '#dcdfe6'
- // }
- // }, warehouseOptions.value.map(platform =>
- // h(ElOption, { label: platform.label, value: platform.value })
- // ))
- // ]),
- h(ElFormItem, {
- label: '鍑哄簱绔欏彴',
- prop: 'selectedPlatform',
- style: {
- marginBottom: '24px'
- }
- }, [
- h(ElSelect, {
- placeholder: '璇烽�夋嫨鍑哄簱绔欏彴',
- modelValue: formData.selectedPlatform,
- 'onUpdate:modelValue': (val) => {
- formData.selectedPlatform = val;
- },
- style: {
- width: '100%',
- height: '40px',
- borderRadius: '4px',
- borderColor: '#dcdfe6'
- }
- }, platformOptions.map(platform =>
- h(ElOption, { label: platform.label, value: platform.value })
- ))
- ]),
- // h(ElFormItem,{
- // label:'鍑哄簱鏁伴噺',
- // prop:'quantity',
- // style:{
- // marginBottom:'24px'
- // }
- // },[h(ElSelect,{
- // placeholder:'璇烽�夋嫨绌虹鏁伴噺',
- // modelValue:formData.quantity,
- // 'onUpdate:modelValue':(val)=>{
- // formData.quantity=val;
- // },
- // style:{
- // width:'100%',
- // height:'40px',
- // borderRadius:'4px',
- // borderColor:'#dcdfe6'
- // },
- // filterable:false
- // },
- // quantityOptions.map(option=>
- // h(ElOption,{
- // label:option.label,
- // value:option.value
- // })
- // )
- // )]),
- h(ElFormItem, {
- label: '鏂欑鍙�',
- prop: 'palletCode',
- style: {
- marginBottom: '16px'
- }
- }, [
- h(ElInput, {
- type: 'text',
- placeholder: '鍙�夎緭鍏ユ枡绠卞彿锛屼笉濉垯鑷姩鍒嗛厤绌烘枡绠�',
- modelValue: formData.palletCode,
- 'onUpdate:modelValue': (val) => {
- formData.palletCode = val;
- },
- style: {
- width: '100%',
- height: '40px',
- borderRadius: '4px',
- borderColor: '#dcdfe6'
- },
- attrs: {
- placeholderStyle: 'color: #909399;'
- }
- })
- ]),
+ // const vnode = createVNode(ElDialog, {
+ // title: '绌烘墭鐩樺嚭搴�',
+ // width: '500px',
+ // modelValue: true,
+ // appendToBody: true,
+ // onOpened: async () => {
+ // await getWarehouseList();
+ // const inputRef = vnode.component.refs.boxCodeInput;
+ // inputRef?.focus();
+ // },
+ // 'onUpdate:modelValue': (isVisible) => {
+ // if (!isVisible) {
+ // render(null, mountNode);
+ // document.body.removeChild(mountNode);
+ // }
+ // },
+ // style: {
+ // padding: '20px 0',
+ // borderRadius: '8px'
+ // }
+ // }, {
+ // default: () => h(ElForm, {
+ // model: formData,
+ // rules: {
+ // warehouseCode: [
+ // { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
+ // ],
+ // palletCode: [
+ // { type: 'string', message: '鏂欑鍙峰繀椤讳负瀛楃涓�', trigger: 'blur' }
+ // ],
+ // selectedPlatform: [
+ // { required: true, message: '璇烽�夋嫨鍑哄簱绔欏彴', trigger: 'change' }
+ // ],
+ // quantity: [
+ // { required: true, message: '璇烽�夋嫨绌虹鏁伴噺', trigger: 'change' }
+ // ]
+ // },
+ // ref: 'batchOutForm',
+ // labelWidth: '100px',
+ // style: {
+ // padding: '0 30px',
+ // }
+ // },
+ // [
+ // // h(ElFormItem, {
+ // // label: '浠撳簱鍖哄煙',
+ // // prop: 'warehouseCode',
+ // // style: {
+ // // marginBottom: '24px'
+ // // }
+ // // }, [
+ // // h(ElSelect, {
+ // // placeholder: '璇烽�夋嫨浠撳簱鍖哄煙',
+ // // modelValue: formData.warehouseCode,
+ // // 'onUpdate:modelValue': (val) => {
+ // // formData.warehouseCode = val;
+ // // },
+ // // style: {
+ // // width: '100%',
+ // // height: '40px',
+ // // borderRadius: '4px',
+ // // borderColor: '#dcdfe6'
+ // // }
+ // // }, warehouseOptions.value.map(platform =>
+ // // h(ElOption, { label: platform.label, value: platform.value })
+ // // ))
+ // // ]),
+ // h(ElFormItem, {
+ // label: '鍑哄簱绔欏彴',
+ // prop: 'selectedPlatform',
+ // style: {
+ // marginBottom: '24px'
+ // }
+ // }, [
+ // h(ElSelect, {
+ // placeholder: '璇烽�夋嫨鍑哄簱绔欏彴',
+ // modelValue: formData.selectedPlatform,
+ // 'onUpdate:modelValue': (val) => {
+ // formData.selectedPlatform = val;
+ // },
+ // style: {
+ // width: '100%',
+ // height: '40px',
+ // borderRadius: '4px',
+ // borderColor: '#dcdfe6'
+ // }
+ // }, platformOptions.map(platform =>
+ // h(ElOption, { label: platform.label, value: platform.value })
+ // ))
+ // ]),
+ // // h(ElFormItem,{
+ // // label:'鍑哄簱鏁伴噺',
+ // // prop:'quantity',
+ // // style:{
+ // // marginBottom:'24px'
+ // // }
+ // // },[h(ElSelect,{
+ // // placeholder:'璇烽�夋嫨绌虹鏁伴噺',
+ // // modelValue:formData.quantity,
+ // // 'onUpdate:modelValue':(val)=>{
+ // // formData.quantity=val;
+ // // },
+ // // style:{
+ // // width:'100%',
+ // // height:'40px',
+ // // borderRadius:'4px',
+ // // borderColor:'#dcdfe6'
+ // // },
+ // // filterable:false
+ // // },
+ // // quantityOptions.map(option=>
+ // // h(ElOption,{
+ // // label:option.label,
+ // // value:option.value
+ // // })
+ // // )
+ // // )]),
+ // h(ElFormItem, {
+ // label: '鏂欑鍙�',
+ // prop: 'palletCode',
+ // style: {
+ // marginBottom: '16px'
+ // }
+ // }, [
+ // h(ElInput, {
+ // type: 'text',
+ // placeholder: '鍙�夎緭鍏ユ枡绠卞彿锛屼笉濉垯鑷姩鍒嗛厤绌烘枡绠�',
+ // modelValue: formData.palletCode,
+ // 'onUpdate:modelValue': (val) => {
+ // formData.palletCode = val;
+ // },
+ // style: {
+ // width: '100%',
+ // height: '40px',
+ // borderRadius: '4px',
+ // borderColor: '#dcdfe6'
+ // },
+ // attrs: {
+ // placeholderStyle: 'color: #909399;'
+ // }
+ // })
+ // ]),
- h('div', {
- style: {
- textAlign: 'right',
- marginTop: '8px',
- paddingRight: '4px'
- }
- }, [
- h(ElButton, {
- type: 'text',
- onClick: () => {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- ElMessage.info('鍙栨秷鍑哄簱鎿嶄綔');
- },
- style: {
- marginRight: '8px',
- color: '#606266'
- }
- }, '鍙栨秷'),
- h(ElButton, {
- type: 'primary',
- onClick: async () => {
- const formRef = vnode.component.refs.batchOutForm;
- try {
- await formRef.validate();
- } catch (err) {
- return;
- }
+ // h('div', {
+ // style: {
+ // textAlign: 'right',
+ // marginTop: '8px',
+ // paddingRight: '4px'
+ // }
+ // }, [
+ // h(ElButton, {
+ // type: 'text',
+ // onClick: () => {
+ // render(null, mountNode);
+ // document.body.removeChild(mountNode);
+ // ElMessage.info('鍙栨秷鍑哄簱鎿嶄綔');
+ // },
+ // style: {
+ // marginRight: '8px',
+ // color: '#606266'
+ // }
+ // }, '鍙栨秷'),
+ // h(ElButton, {
+ // type: 'primary',
+ // onClick: async () => {
+ // const formRef = vnode.component.refs.batchOutForm;
+ // try {
+ // await formRef.validate();
+ // } catch (err) {
+ // return;
+ // }
- http.post('/api/Task/PalletOutboundTask?palletCode=' + formData.palletCode + '&endStation=' + formData.selectedPlatform, {
+ // http.post('/api/Task/PalletOutboundTask?palletCode=' + formData.palletCode + '&endStation=' + formData.selectedPlatform, {
- }).then(({ data, status, message }) => {
- if (status) {
+ // }).then(({ data, status, message }) => {
+ // if (status) {
- ElMessage.success(`鍑哄簱鎴愬姛`);
- this.refresh();
- render(null, mountNode);
- document.body.removeChild(mountNode);
- } else {
- ElMessage.error(message || data?.message || '鍑哄簱澶辫触');
- }
- }).catch(() => {
- ElMessage.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
- });
- },
- style: {
- borderRadius: '4px',
- padding: '8px 20px'
- }
- }, '纭畾')
- ])
- ])
- });
+ // ElMessage.success(`鍑哄簱鎴愬姛`);
+ // this.refresh();
+ // render(null, mountNode);
+ // document.body.removeChild(mountNode);
+ // } else {
+ // ElMessage.error(message || data?.message || '鍑哄簱澶辫触');
+ // }
+ // }).catch(() => {
+ // ElMessage.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
+ // });
+ // },
+ // style: {
+ // borderRadius: '4px',
+ // padding: '8px 20px'
+ // }
+ // }, '纭畾')
+ // ])
+ // ])
+ // });
- vnode.appContext = this.$.appContext;
- render(vnode, mountNode);
- }
- }
+ // vnode.appContext = this.$.appContext;
+ // render(vnode, mountNode);
+ // }
+ // }
], box: [], detail: []
}, //鎵╁睍鐨勬寜閽�
methods: {
@@ -325,8 +324,6 @@
table.clearSelection();
table.toggleRowSelection(row, true);
}
- const rowId = row.id;
- console.log(rowId);
this.$refs.gridBody.open(row);
}
});
@@ -340,15 +337,18 @@
if (!selectedRows || selectedRows.length === 0) {
return _this.$Message.warning('璇峰厛閫夋嫨闇�瑕佸鐞嗙殑鍗曟嵁');
}
- const requestParams = {
- orderNos: selectedRows.map(row => row.orderNo),
- inout: 2
- };
+ if (selectedRows.length > 1) {
+ return _this.$Message.warning('璇烽�夋嫨涓�鏉℃暟鎹�');
+ }
+ // const requestParams = {
+ // orderNos: selectedRows.map(row => row.orderNo),
+ // inout: 2
+ // };
_this.http
- .post("api/InboundOrder/BatchOrderFeedbackToMes", requestParams, "鏁版嵁澶勭悊涓�...")
+ .post(`api/MesFeedback/OutboundFeedback?orderNo=${selectedRows[0].orderNo}`, {}, "鏁版嵁澶勭悊涓�...")
.then((x) => {
if (x.status) {
- _this.$Message.success('鍒嗘壒鍑哄簱鍥炶皟瀹屾垚');
+ _this.$Message.success(x.message);
_this.refresh();
} else {
return _this.$Message.error(x.message);
@@ -356,7 +356,7 @@
})
.catch((error) => {
// 澧炲姞寮傚父鎹曡幏锛屽鐞嗙綉缁滈敊璇瓑鎯呭喌
- _this.$Message.error('璇锋眰澶辫触锛�' + (error.message || '鏈煡閿欒'));
+ //_this.$Message.error('璇锋眰澶辫触锛�' + (error.message || '鏈煡閿欒'));
});
};
}
@@ -367,15 +367,188 @@
}
}
+
+
var EmptyTrayOutboundBtn = this.buttons.find(x => x.value == "EmptyTrayOutbound");
- if (EmptyTrayOutboundBtn != null) {
- EmptyTrayOutboundBtn.onClick = () => {
- let rows = this.$refs.table.getSelected();
- if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
- if (rows.length >1) return this.$error("璇烽�夋嫨鏁版嵁!");
- this.$refs.gridHeader.open();
- }
+ if (EmptyTrayOutboundBtn != null) {
+ EmptyTrayOutboundBtn.onClick = () => {
+ this.$refs.gridFooter.open();
}
+ }
+
+ let OrderOutBtn = this.buttons.find(x => x.value == 'OrderOut');
+if (OrderOutBtn) {
+ // 1. 鏀逛负绠ご鍑芥暟锛岀‘淇漷his鎸囧悜Vue缁勪欢瀹炰緥锛堝師鏅�氬嚱鏁皌his鎸囧悜鎸夐挳鏈韩锛�
+ OrderOutBtn.onClick = async () => {
+ // 鐜板湪this鏄疺ue缁勪欢瀹炰緥锛岃兘姝g‘鑾峰彇$refs
+ let rows = this.$refs.table.getSelected();
+ if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+ if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!");
+
+
+ // 纭繚閫変腑琛屾湁id锛堟牴鎹疄闄呰〃鏍兼暟鎹瓧娈佃皟鏁达紝姣斿rows[0].detailId绛夛級
+ const selectedId = rows[0].id || rows[0].detailId;
+ if (!selectedId) return this.$error("閫変腑鏁版嵁缂哄皯蹇呰ID瀛楁!");
+
+ if(rows[0].orderStatus!=0&&rows[0].orderStatus!=1)return this.$error("璇ュ崟鎹凡缁忓畬鎴�");
+
+ const platformOptions = [
+ { label: "绔欏彴2", value: "2-1" },
+ { label: "绔欏彴3", value: "3-1" },
+ ];
+ const mountNode = document.createElement("div");
+ document.body.appendChild(mountNode);
+
+ const formData = reactive({
+ selectedPlatform: platformOptions[0].value,
+ });
+
+ const vnode = createVNode(
+ ElDialog,
+ {
+ title: "鍑哄簱鎿嶄綔 - 閫夋嫨鍑哄簱绔欏彴",
+ width: "500px",
+ modelValue: true,
+ appendToBody: true,
+ "onUpdate:modelValue": (isVisible) => {
+ if (!isVisible) {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ }
+ },
+ style: {
+ padding: "20px 0",
+ borderRadius: "8px",
+ },
+ },
+ {
+ default: () =>
+ h(
+ ElForm,
+ {
+ model: formData,
+ rules: {
+ selectedPlatform: [
+ { required: true, message: "璇烽�夋嫨鍑哄簱绔欏彴", trigger: "change" },
+ ],
+ },
+ ref: "outboundForm", // 琛ㄥ崟ref
+ labelWidth: "100px",
+ style: {
+ padding: "0 30px",
+ },
+ },
+ [
+ h(ElFormItem, {
+ label: "鍑哄簱绔欏彴",
+ prop: "selectedPlatform",
+ style: {
+ marginBottom: "24px",
+ },
+ }, [
+ h(ElSelect, {
+ placeholder: "璇烽�夋嫨鍑哄簱绔欏彴锛�3-12锛�",
+ modelValue: formData.selectedPlatform,
+ "onUpdate:modelValue": (val) => {
+ formData.selectedPlatform = val;
+ },
+ style: {
+ width: "100%",
+ height: "40px",
+ borderRadius: "4px",
+ borderColor: "#dcdfe6",
+ },
+ }, platformOptions.map((platform) =>
+ h(ElOption, { label: platform.label, value: platform.value })
+ )),
+ ]),
+ h("div", {
+ style: {
+ textAlign: "right",
+ marginTop: "8px",
+ paddingRight: "4px",
+ },
+ }, [
+ h(ElButton, {
+ type: "text",
+ onClick: () => {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ ElMessage.info("鍙栨秷鍑哄簱鎿嶄綔");
+ },
+ style: {
+ marginRight: "8px",
+ color: "#606266",
+ },
+ }, "鍙栨秷"),
+ h(ElButton, {
+ type: "primary",
+ onClick: async () => {
+ // 2. 纭繚琛ㄥ崟ref宸叉寕杞斤紙鐢╪extTick閬垮厤鑾峰彇涓嶅埌锛�
+ await this.$nextTick();
+ const formRef = vnode.component.refs.outboundForm;
+
+ if (!formRef) {
+ ElMessage.error("琛ㄥ崟鍒濆鍖栧け璐ワ紝璇烽噸璇�");
+ return;
+ }
+
+ try {
+ await formRef.validate();
+ } catch (err) {
+ return;
+ }
+ var param = rows[0].orderNo;
+ const requestParams = {
+ detailIds: [],
+ outboundTargetLocation: formData.selectedPlatform,
+ outboundQuantity: 1,
+ operator: this.currentOperator || "admin",
+ orderNo: param,
+ };
+
+ try {
+
+ const x = await this.http.post(
+ "api/Outbound/ProcessPickingOutbound",
+ requestParams,
+ "鏁版嵁澶勭悊涓�"
+ );
+
+ if (!x.status) {
+ ElMessage.error(x.message || "鎿嶄綔澶辫触");
+ return;
+ }
+
+ ElMessage.success("鎿嶄綔鎴愬姛");
+ this.showDetialBox = false;
+ this.$emit("parentCall", ($vue) => {
+ $vue.getData();
+ });
+ } catch (error) {
+ // 5. 鎵撳紑閿欒鎹曡幏锛屾柟渚胯皟璇�
+ console.error("鍑哄簱鎺ュ彛璇锋眰澶辫触锛�", error);
+ ElMessage.error("璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯");
+ } finally {
+ // 鏃犺鎴愬姛澶辫触锛岄兘鍏抽棴寮圭獥
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ }
+ },
+ style: {
+ borderRadius: "4px",
+ padding: "8px 20px",
+ },
+ }, "纭畾鍑哄簱"),
+ ]),
+ ]),
+ }
+ );
+
+ vnode.appContext = this.$.appContext;
+ render(vnode, mountNode);
+ };
+}
},
onInited() {
@@ -384,19 +557,9 @@
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
+
//鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
//杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
-
- let wheres = [{
- 'name': 'orderType',
- 'value': '0',
- 'displayType': 'text'
- }];
-
-
- param.wheres.push(...wheres);
- return true;
-
return true;
},
searchAfter(result) {
@@ -416,6 +579,10 @@
this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
},
modelOpenAfter(row) {
+ if (this.currentAction === 'Add') { // 鍒ゆ柇褰撳墠鏄柊寤烘搷浣�
+ const currentUser = this.$store.state.userInfo?.userTrueName || 'system';
+ this.editFormFields.operator = currentUser;
+ }
//鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
//(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
//(2)缁欏脊鍑烘璁剧疆榛樿鍊�
--
Gitblit v1.9.3