Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
| | |
| | | </el-row> |
| | | </el-alert> |
| | | </div> |
| | | |
| | | <!-- æ°å¢çéåºå --> |
| | | <div class="filter-area" style="margin: 10px 0; padding: 10px; background: #f8f9fa; border-radius: 4px;"> |
| | | <el-form :model="filterForm" inline @submit.prevent> |
| | | <el-form-item label="ç©æç¼å·ï¼"> |
| | | <el-input |
| | | v-model="filterForm.materielCode" |
| | | placeholder="模ç³çéç©æç¼å·" |
| | | clearable |
| | | style="width: 180px" |
| | | @input="filterTable" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç©ææ¡ç ï¼"> |
| | | <el-input |
| | | v-model="filterForm.barcode" |
| | | placeholder="模ç³çéç©ææ¡ç " |
| | | clearable |
| | | style="width: 180px" |
| | | @input="filterTable" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æçç¼å·ï¼"> |
| | | <el-input |
| | | v-model="filterForm.palletCode" |
| | | placeholder="模ç³çéæçç¼å·" |
| | | clearable |
| | | style="width: 180px" |
| | | @input="filterTable" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è´§ä½ç¼å·ï¼"> |
| | | <el-input |
| | | v-model="filterForm.locationCode" |
| | | placeholder="模ç³çéè´§ä½ç¼å·" |
| | | clearable |
| | | style="width: 180px" |
| | | @input="filterTable" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="filterTable">æç´¢</el-button> |
| | | <el-button @click="resetFilter">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="box-table" style="margin-top: 1%"> |
| | | <el-table |
| | | ref="singleTable" |
| | |
| | | row: null, |
| | | showDetialBox: false, |
| | | tableData: [], |
| | | originalTableData: [], // æ°å¢ï¼åå¨åå§æ°æ®ï¼ç¨äºçé |
| | | tableColumns: [ |
| | | { prop: "materielCode", title: "ç©æç¼å·", type: "string", width: 150 }, |
| | | { prop: "barcode", title: "ç©ææ¡ç ", type: "string", width: 150 }, |
| | |
| | | selectionSum: 0, |
| | | selectionClass: "less-style", |
| | | originalQuantity: 0, |
| | | |
| | | // æ°å¢ï¼çéè¡¨åæ°æ® |
| | | filterForm: { |
| | | materielCode: "", |
| | | barcode: "", |
| | | palletCode: "", |
| | | locationCode: "" |
| | | }, |
| | | |
| | | // åºåºå¼¹çªç¸å
³æ°æ® |
| | | showOutboundDialog: false, |
| | |
| | | this.$refs.outboundFormRef.validate((valid) => { |
| | | if (!valid) return; |
| | | |
| | | |
| | | if (this.selection.length <= 0) { |
| | | return this.$message.error("请å¾é"); |
| | | } |
| | | let url = this.pkcx |
| | | ? "api/Task/GenerateOutboundTask?orderDetailId=" |
| | | : "api/Task/GenerateOutboundTask?orderDetailId="; |
| | | this.http |
| | | .post(url + this.row.id+"&station="+this.outboundForm.selectedPlatform, this.selection, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | if (this.selection.length <= 0) { |
| | | return this.$message.error("请å¾é"); |
| | | } |
| | | let url = this.pkcx |
| | | ? "api/Task/GenerateOutboundTask?orderDetailId=" |
| | | : "api/Task/GenerateOutboundTask?orderDetailId="; |
| | | this.http |
| | | .post(url + this.row.id+"&station="+this.outboundForm.selectedPlatform, this.selection, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | }); |
| | | }, |
| | |
| | | ) |
| | | .then((x) => { |
| | | this.tableData = x; |
| | | this.originalTableData = x; // æ°å¢ï¼ä¿ååå§æ°æ® |
| | | // å·æ°åæ¸
空ä¹åçéæ©åè®¡æ° |
| | | this.clearSelection(); |
| | | this.selectionSum = 0; |
| | | this.originalQuantity = 0; |
| | | this.updateSelectionClass(); |
| | | // å·æ°åéç½®ç鿡件 |
| | | this.resetFilter(); |
| | | }); |
| | | }, |
| | | |
| | |
| | | // æ´æ°å·²éæ°éæ ·å¼ |
| | | updateSelectionClass() { |
| | | if (!this.row) return; |
| | | if (this.selectionSum === this.row.orderQuantity) { |
| | | // ä¿®å¤ï¼row.orderQuantity æ¹ä¸º row.qtyï¼æ¨¡æ¿éæ¾ç¤ºçæ¯row.qtyï¼ |
| | | if (this.selectionSum === this.row.qty) { |
| | | this.selectionClass = "equle-style"; |
| | | } else if (this.selectionSum < this.row.orderQuantity) { |
| | | } else if (this.selectionSum < this.row.qty) { |
| | | this.selectionClass = "less-style"; |
| | | } else { |
| | | this.selectionClass = "more-style"; |
| | |
| | | tableButtonClick(row, item) { |
| | | console.log("徿 æé®ç¹å»ï¼", item.title, row); |
| | | }, |
| | | |
| | | // æ°å¢ï¼çéè¡¨æ ¼æ°æ® |
| | | filterTable() { |
| | | if (!this.originalTableData.length) return; |
| | | |
| | | // è§£æçéæ¡ä»¶å¹¶è½¬ä¸ºå°åï¼å¿½ç¥å¤§å°åï¼ |
| | | const { materielCode, barcode, palletCode, locationCode } = this.filterForm; |
| | | const mc = materielCode.toLowerCase().trim(); |
| | | const bc = barcode.toLowerCase().trim(); |
| | | const pc = palletCode.toLowerCase().trim(); |
| | | const lc = locationCode.toLowerCase().trim(); |
| | | |
| | | // 模ç³çéé»è¾ |
| | | this.tableData = this.originalTableData.filter(item => { |
| | | // æ¯ä¸ªå段é½å空å¼å¤çåå°å转æ¢ï¼æ¯ææ¨¡ç³å¹é
|
| | | const itemMc = (item.materielCode || "").toLowerCase(); |
| | | const itemBc = (item.barcode || "").toLowerCase(); |
| | | const itemPc = (item.palletCode || "").toLowerCase(); |
| | | const itemLc = (item.locationCode || "").toLowerCase(); |
| | | |
| | | return ( |
| | | itemMc.includes(mc) && |
| | | itemBc.includes(bc) && |
| | | itemPc.includes(pc) && |
| | | itemLc.includes(lc) |
| | | ); |
| | | }); |
| | | |
| | | // çé忏
ç©ºéæ©ç¶æ |
| | | this.clearSelection(); |
| | | this.selectionSum = 0; |
| | | this.updateSelectionClass(); |
| | | }, |
| | | |
| | | // æ°å¢ï¼éç½®ç鿡件 |
| | | resetFilter() { |
| | | this.filterForm = { |
| | | materielCode: "", |
| | | barcode: "", |
| | | palletCode: "", |
| | | locationCode: "" |
| | | }; |
| | | // æ¢å¤åå§æ°æ® |
| | | this.tableData = [...this.originalTableData]; |
| | | // éç½®éæ©ç¶æ |
| | | this.clearSelection(); |
| | | this.selectionSum = 0; |
| | | this.updateSelectionClass(); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | .more-style { |
| | | color: red; |
| | | } |
| | | |
| | | /* çéåºåæ ·å¼ä¼å */ |
| | | .filter-area :deep(.el-form-item) { |
| | | margin-bottom: 0; |
| | | margin-right: 10px; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import http from '@/api/http.js' |
| | | import { h, createVNode, render, reactive, ref } from 'vue'; |
| | |
| | | this.$emit('openPalletDialog', targetRow.inboundOrderNo); |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¤éç»ç', |
| | | type: 'primary', |
| | | value: 'æ¤éç»ç', |
| | | onClick: function () { |
| | | console.log('æ¤éç»çæé®è¢«ç¹å»'); |
| | | const mountNode = document.createElement('div'); |
| | | document.body.appendChild(mountNode); |
| | | { |
| | | name: 'æ¤éç»ç', |
| | | type: 'primary', |
| | | value: 'æ¤éç»ç', |
| | | onClick: function () { |
| | | console.log('æ¤éç»çæé®è¢«ç¹å»'); |
| | | const mountNode = document.createElement('div'); |
| | | document.body.appendChild(mountNode); |
| | | |
| | | // ååºå¼è¡¨åæ°æ®ï¼æçå·ï¼å¿
å¡«ï¼ |
| | | const formData = reactive({ |
| | | palletCode: '', // æçå·è¾å
¥æ¡ |
| | | barcode:'' |
| | | }); |
| | | // ååºå¼è¡¨åæ°æ®ï¼æçå·ï¼å¿
å¡«ï¼ |
| | | const formData = reactive({ |
| | | palletCode: '', // æçå·è¾å
¥æ¡ |
| | | barcode: '' |
| | | }); |
| | | |
| | | // æäº¤è¡¨åçç»ä¸é»è¾ |
| | | const submitForm = async () => { |
| | | const formRef = vnode.component.refs.cancelPalletForm; |
| | | try { |
| | | // æ§è¡è¡¨åæ ¡éªï¼æçå·å¿
å¡«ï¼ |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | ElMessage.warning('请è¾å
¥ææçæçå·'); |
| | | return; |
| | | } |
| | | // æäº¤è¡¨åçç»ä¸é»è¾ |
| | | const submitForm = async () => { |
| | | const formRef = vnode.component.refs.cancelPalletForm; |
| | | try { |
| | | // æ§è¡è¡¨åæ ¡éªï¼æçå·å¿
å¡«ï¼ |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | ElMessage.warning('请è¾å
¥ææçæçå·'); |
| | | return; |
| | | } |
| | | |
| | | // åèµ·æ¤éç»çè¯·æ± |
| | | try { |
| | | //console.log('åèµ·æ¤éç»ç请æ±ï¼æçå·ï¼', formData.palletCode.trim()); |
| | | const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode='+formData.palletCode.trim()+'&barcode='+formData.barcode.trim()); |
| | | |
| | | // åèµ·æ¤éç»çè¯·æ± |
| | | try { |
| | | //console.log('åèµ·æ¤éç»ç请æ±ï¼æçå·ï¼', formData.palletCode.trim()); |
| | | const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode=' + formData.palletCode.trim() + '&barcode=' + formData.barcode.trim()); |
| | | |
| | | const { status, message, data } = response; |
| | | if (status) { |
| | | ElMessage.success(response.message); |
| | | console.log(response.message) |
| | | this.refresh(); // æååå·æ°å表 |
| | | // å
³éå¯¹è¯æ¡ |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } else { |
| | | console.log('æ¤éç»ç失败ï¼å端æç¤ºï¼', message); |
| | | ElMessage.error(message || data?.message || 'æ¤éç»ç失败'); |
| | | selectPalletCodeInput(); // éä¸è¾å
¥æ¡æ¹ä¾¿éæ°è¾å
¥ |
| | | } |
| | | } catch (error) { |
| | | console.error('æ¤éç»ç请æ±å¼å¸¸ï¼', error); |
| | | ElMessage.error('ç½ç»å¼å¸¸ææ¥å£é误ï¼è¯·ç¨åéè¯'); |
| | | selectPalletCodeInput(); |
| | | } |
| | | }; |
| | | |
| | | // éä¸è¾å
¥æ¡ææ¬ï¼æ¹ä¾¿éæ°è¾å
¥ï¼ |
| | | const selectPalletCodeInput = () => { |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.palletCodeInput; |
| | | if (inputRef) { |
| | | const targetInput = inputRef.$el?.querySelector('input') || inputRef; |
| | | targetInput?.focus(); |
| | | targetInput?.select(); |
| | | } |
| | | }, 100); |
| | | }; |
| | | const { status, message, data } = response; |
| | | if (status) { |
| | | ElMessage.success(response.message); |
| | | console.log(response.message) |
| | | this.refresh(); // æååå·æ°å表 |
| | | // å
³éå¯¹è¯æ¡ |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } else { |
| | | console.log('æ¤éç»ç失败ï¼å端æç¤ºï¼', message); |
| | | ElMessage.error(message || data?.message || 'æ¤éç»ç失败'); |
| | | selectPalletCodeInput(); // éä¸è¾å
¥æ¡æ¹ä¾¿éæ°è¾å
¥ |
| | | } |
| | | } catch (error) { |
| | | console.error('æ¤éç»ç请æ±å¼å¸¸ï¼', error); |
| | | ElMessage.error('ç½ç»å¼å¸¸ææ¥å£é误ï¼è¯·ç¨åéè¯'); |
| | | selectPalletCodeInput(); |
| | | } |
| | | }; |
| | | |
| | | // åå»ºå¯¹è¯æ¡VNode |
| | | const vnode = createVNode(ElDialog, { |
| | | title: 'æ¤éç»ç', |
| | | width: '400px', |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | onOpened: () => { |
| | | // å¯¹è¯æ¡æå¼åèªå¨èç¦è¾å
¥æ¡ |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.palletCodeInput; |
| | | inputRef?.focus(); |
| | | }, 100); |
| | | }, |
| | | 'onUpdate:modelValue': (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | } |
| | | }, { |
| | | default: () => h(ElForm, { |
| | | model: formData, |
| | | rules: { |
| | | palletCode: [ |
| | | { required: true, message: '请è¾å
¥æçå·', trigger: ['blur', 'enter'] }, |
| | | { min: 1, max: 50, message: 'æçå·é¿åº¦ä¸è½è¶
è¿50个å符', trigger: ['blur', 'input'] } |
| | | ] |
| | | }, |
| | | ref: 'cancelPalletForm' |
| | | }, [ |
| | | // æçå·è¾å
¥é¡¹ |
| | | h(ElFormItem, { label: 'æçå·', prop: 'palletCode', required: true }, [ |
| | | h(ElInput, { |
| | | type: 'text', |
| | | modelValue: formData.palletCode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.palletCode = val; |
| | | }, |
| | | ref: 'palletCodeInput', |
| | | placeholder: 'æ«ç è¾å
¥ææå¨è¾å
¥æçå·', |
| | | maxLength: 50, |
| | | // çå¬å车äºä»¶ï¼æ«ç æªé»è®¤ä¼åéåè½¦ï¼ |
| | | onKeydown: (e) => { |
| | | if (e.key === 'Enter') { |
| | | e.preventDefault(); |
| | | submitForm(); |
| | | } |
| | | } |
| | | }) |
| | | ]), |
| | | h(ElFormItem,{label: 'æ¡ç ', prop: 'barcode'},[ |
| | | h(ElInput, { |
| | | type: 'text', |
| | | modelValue: formData.barcode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.barcode = val; |
| | | }, |
| | | placeholder: 'å¯éï¼æ«ç è¾å
¥ææå¨è¾å
¥æ¡ç ', |
| | | maxLength: 50, |
| | | onKeydown: (e) => { |
| | | if (e.key === 'Enter') { |
| | | e.preventDefault(); |
| | | submitForm(); |
| | | } |
| | | } |
| | | }) |
| | | ]), |
| | | // åºé¨æé®åº |
| | | h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [ |
| | | h(ElButton, { |
| | | type: 'text', |
| | | onClick: () => { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | ElMessage.info('åæ¶æ¤éç»ç'); |
| | | } |
| | | }, 'åæ¶'), |
| | | h(ElButton, { |
| | | type: 'primary', |
| | | onClick: submitForm.bind(this) // ç»å®thisä¸ä¸æ |
| | | }, '确认æ¤é') |
| | | ]) |
| | | ]) |
| | | }); |
| | | // éä¸è¾å
¥æ¡ææ¬ï¼æ¹ä¾¿éæ°è¾å
¥ï¼ |
| | | const selectPalletCodeInput = () => { |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.palletCodeInput; |
| | | if (inputRef) { |
| | | const targetInput = inputRef.$el?.querySelector('input') || inputRef; |
| | | targetInput?.focus(); |
| | | targetInput?.select(); |
| | | } |
| | | }, 100); |
| | | }; |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | } |
| | | // åå»ºå¯¹è¯æ¡VNode |
| | | const vnode = createVNode(ElDialog, { |
| | | title: 'æ¤éç»ç', |
| | | width: '400px', |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | onOpened: () => { |
| | | // å¯¹è¯æ¡æå¼åèªå¨èç¦è¾å
¥æ¡ |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.palletCodeInput; |
| | | inputRef?.focus(); |
| | | }, 100); |
| | | }, |
| | | 'onUpdate:modelValue': (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | } |
| | | }, { |
| | | default: () => h(ElForm, { |
| | | model: formData, |
| | | rules: { |
| | | palletCode: [ |
| | | { required: true, message: '请è¾å
¥æçå·', trigger: ['blur', 'enter'] }, |
| | | { min: 1, max: 50, message: 'æçå·é¿åº¦ä¸è½è¶
è¿50个å符', trigger: ['blur', 'input'] } |
| | | ] |
| | | }, |
| | | ref: 'cancelPalletForm' |
| | | }, [ |
| | | // æçå·è¾å
¥é¡¹ |
| | | h(ElFormItem, { label: 'æçå·', prop: 'palletCode', required: true }, [ |
| | | h(ElInput, { |
| | | type: 'text', |
| | | modelValue: formData.palletCode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.palletCode = val; |
| | | }, |
| | | ref: 'palletCodeInput', |
| | | placeholder: 'æ«ç è¾å
¥ææå¨è¾å
¥æçå·', |
| | | maxLength: 50, |
| | | // çå¬å车äºä»¶ï¼æ«ç æªé»è®¤ä¼åéåè½¦ï¼ |
| | | onKeydown: (e) => { |
| | | if (e.key === 'Enter') { |
| | | e.preventDefault(); |
| | | submitForm(); |
| | | } |
| | | } |
| | | }) |
| | | ]), |
| | | h(ElFormItem, { label: 'æ¡ç ', prop: 'barcode' }, [ |
| | | h(ElInput, { |
| | | type: 'text', |
| | | modelValue: formData.barcode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.barcode = val; |
| | | }, |
| | | placeholder: 'å¯éï¼æ«ç è¾å
¥ææå¨è¾å
¥æ¡ç ', |
| | | maxLength: 50, |
| | | onKeydown: (e) => { |
| | | if (e.key === 'Enter') { |
| | | e.preventDefault(); |
| | | submitForm(); |
| | | } |
| | | } |
| | | }) |
| | | ]), |
| | | // åºé¨æé®åº |
| | | h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [ |
| | | h(ElButton, { |
| | | type: 'text', |
| | | onClick: () => { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | ElMessage.info('åæ¶æ¤éç»ç'); |
| | | } |
| | | }, 'åæ¶'), |
| | | h(ElButton, { |
| | | type: 'primary', |
| | | onClick: submitForm.bind(this) // ç»å®thisä¸ä¸æ |
| | | }, '确认æ¤é') |
| | | ]) |
| | | ]) |
| | | }); |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | } |
| | | }, |
| | | { |
| | | name: 'åæ¹å
¥åº', |
| | | type: 'primary', |
| | |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | this.columns.forEach(column => { |
| | | if (column.field === 'orderStatistics') { |
| | | column.formatter = (row) => { |
| | | // æ ¡éªdetailsæ¯å¦åå¨ä¸ææ°æ® |
| | | if (row.details && row.details.length > 0) { |
| | | //æmaterielCodeåç»ç»è®¡orderQuantityæ»å |
| | | const materielSumMap = row.details.reduce((acc, item) => { |
| | | const materielCode = item.materielCode || 'æªç¥ç©æ'; |
| | | const quantity = Number(item.orderQuantity) || 0; |
| | | acc[materielCode] = (acc[materielCode] || 0) + quantity; |
| | | return acc; |
| | | }, {}); |
| | | if (column.field === 'orderStatistics') { |
| | | column.formatter = (row) => { |
| | | // æ ¡éªdetailsæ¯å¦åå¨ä¸ææ°æ® |
| | | if (row.details && row.details.length > 0) { |
| | | //æmaterielCodeåç»ç»è®¡orderQuantityæ»å |
| | | const materielSumMap = row.details.reduce((acc, item) => { |
| | | const materielCode = item.materielCode || 'æªç¥ç©æ'; |
| | | const quantity = Number(item.orderQuantity) || 0; |
| | | acc[materielCode] = (acc[materielCode] || 0) + quantity; |
| | | return acc; |
| | | }, {}); |
| | | |
| | | //æ¯ä¸ªç©æé¡¹çæç¬ç«divï¼è·¨è¡æ¾ç¤º |
| | | const displayItems = Object.entries(materielSumMap).map(([code, total]) => { |
| | | return `<div style="line-height: 1.5; white-space: normal;">${code}ï¼${total}个</div>`; |
| | | }); |
| | | const displayContent = displayItems.join(''); |
| | | return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`; |
| | | } else { |
| | | return '<span style="color: #F56C6C">æ å
¥åºæç»</span>'; |
| | | } |
| | | }; |
| | | } |
| | | }); |
| | | //æ¯ä¸ªç©æé¡¹çæç¬ç«divï¼è·¨è¡æ¾ç¤º |
| | | const displayItems = Object.entries(materielSumMap).map(([code, total]) => { |
| | | return `<div style="line-height: 1.5; white-space: normal;">${code}ï¼${total}个</div>`; |
| | | }); |
| | | const displayContent = displayItems.join(''); |
| | | return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`; |
| | | } else { |
| | | return '<span style="color: #F56C6C">æ å
¥åºæç»</span>'; |
| | | } |
| | | }; |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | |
| | |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | export default extension; |
| | |
| | | <span>å·²éä¸ {{ selection.length }} 项</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="lockstocks" |
| | | >éå®åºå</el-link> --> |
| | | |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | v-if="isBatch === 0" |
| | | v-if="isBatch === 0" |
| | | style="float: right; height: 20px" |
| | | @click="handleOpenPicking" |
| | | >æ£é</el-link> |
| | | <el-link |
| | | >æ£é</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | v-if="isBatch === 1" |
| | | v-if="isBatch === 1" |
| | | @click="handleOpenBatchPicking" |
| | | >åæ¹æ£é</el-link> |
| | | >åæ¹æ£é</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | v-if="isBatch === 0" |
| | | v-if="isBatch === 0" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="outbound" |
| | | >ç´æ¥åºåº</el-link |
| | | > |
| | | <el-link |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | v-if="isBatch === 1" |
| | | v-if="isBatch === 1" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="outboundbatch" |
| | | >åæ¹åºåº</el-link |
| | |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="getData" |
| | | >å·æ°</el-link |
| | | ></el-col |
| | | > |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </el-alert> |
| | | </div> |
| | |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | :disabled="getButtonEnable(item.prop, scoped.row)" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-link |
| | | ></el-tooltip> |
| | | > |
| | | <i :class="item.icon" style="font-size: 22px"></i> |
| | | </el-link> |
| | | </el-tooltip> |
| | | </div> |
| | | |
| | | <div v-else-if="item.type == 'tag'"> |
| | | <el-tag size="small"> |
| | | {{ getDictionary(scoped.row, item) }} |
| | | </el-tag> |
| | | </div> |
| | | <div v-else> |
| | | {{ scoped.row[item.prop] }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <NoStockOut ref="NoStockOut" @parentCall="parentCall"></NoStockOut> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | import VolForm from "@/components/basic/VolForm.vue"; |
| | | import StockSelect from "./StockSelect.vue"; |
| | | import SelectedStock from "./SelectedStock.vue"; |
| | | import NoStockOut from "./NoStockOut.vue"; |
| | | import { h,createVNode, render,reactive } from 'vue'; |
| | | import { ElDialog , ElForm, ElFormItem, ElSelect,ElOption, ElButton, ElInput, ElMessage } from 'element-plus'; |
| | | import { th } from 'element-plus/es/locale'; |
| | | import { h, createVNode, render, reactive } from "vue"; |
| | | import { |
| | | ElDialog, |
| | | ElForm, |
| | | ElFormItem, |
| | | ElSelect, |
| | | ElOption, |
| | | ElButton, |
| | | ElInput, |
| | | ElMessage, |
| | | } from "element-plus"; |
| | | |
| | | export default { |
| | | components: { VolBox, VolForm, StockSelect, SelectedStock,NoStockOut}, |
| | | components: { VolBox, VolForm, StockSelect, SelectedStock, NoStockOut }, |
| | | data() { |
| | | return { |
| | | row: null, |
| | | isBatch :0, |
| | | isBatch: 0, |
| | | showDetialBox: false, |
| | | flag: false, |
| | | currentRow: null, |
| | | selection: [], |
| | | tableData: [], |
| | | mainBusinessType: null, // æ°å¢ï¼åå¨ä¸»åæ®çbusinessType |
| | | tableColumns: [ |
| | | { |
| | | prop: "id", |
| | |
| | | prop: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | width: 120, |
| | | }, |
| | | { |
| | | prop: "materielName", |
| | |
| | | prop: "supplyCode", |
| | | title: "ä¾åºåç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "orderQuantity", |
| | |
| | | prop: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 90, |
| | | width: 80, |
| | | }, |
| | | { |
| | | prop: "orderDetailStatus", |
| | |
| | | title: "æå®åºå", |
| | | type: "icon", |
| | | width: 90, |
| | | hidden:true, |
| | | hidden: true, // é»è®¤éè |
| | | icon: "el-icon-s-grid", |
| | | }, |
| | | { |
| | |
| | | order: "desc", |
| | | Foots: "", |
| | | total: 0, |
| | | // 2020.08.29å¢å èªå®ä¹å页æ¡å¤§å° |
| | | sizes: [30, 60, 100, 120], |
| | | size: 30, // é»è®¤åé¡µå¤§å° |
| | | size: 30, |
| | | Wheres: [], |
| | | page: 1, |
| | | rows: 30, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | toggleAssignStockColumn() { |
| | | const assignStockColumn = this.tableColumns.find( |
| | | (item) => item.prop === "assignStock" |
| | | ); |
| | | if (assignStockColumn) { |
| | | // businessType为22æ¶æ¾ç¤ºï¼å¦åéè |
| | | assignStockColumn.hidden = this.mainBusinessType !=='22'; |
| | | } |
| | | }, |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | console.log(this.row); |
| | | console.log("ä¸»åæ®æ°æ®ï¼", this.row); |
| | | this.isBatch = row.isBatch; |
| | | this.mainBusinessType = row.businessType; |
| | | this.getDictionaryData(); |
| | | this.getData(); |
| | | this.toggleAssignStockColumn(); |
| | | }, |
| | | getData() { |
| | | var wheres = [{ name: "orderId", value: this.row.id }]; |
| | |
| | | rows: this.paginations.rows, |
| | | sort: this.paginations.sort, |
| | | order: this.paginations.order, |
| | | wheres: JSON.stringify(wheres), // æ¥è¯¢æ¡ä»¶ï¼æ ¼å¼ä¸º[{ name: "åæ®µ", value: "xx" }] |
| | | wheres: JSON.stringify(wheres), |
| | | }; |
| | | this.http |
| | | .post("api/OutboundOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | this.tableData = x.rows; |
| | | this.toggleAssignStockColumn(); // æ°æ®å è½½åéæ°ç¡®è®¤åæ¾é |
| | | }); |
| | | }, |
| | | tableButtonClick(row, column) { |
| | |
| | | this.$refs.child.open(row); |
| | | } else if (column.prop == "NoStockOut") { |
| | | this.$refs.NoStockOut.open(row); |
| | | }else{ |
| | | //ç¹å»æå¼åºåºè¯¦æ
|
| | | } else { |
| | | this.$refs.selectedStock.open(row); |
| | | } |
| | | }, |
| | |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | var keys = this.selection.map((item) => item.id); |
| | | this.http |
| | | .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | // æå¼æ£éé¡µé¢ |
| | | handleOpenPicking() { |
| | | handleOpenPicking() { |
| | | this.$router.push({ |
| | | path: '/outbound/picking', |
| | | query: { orderId: this.row.id ,orderNo:this.row.orderNo} |
| | | }) |
| | | path: "/outbound/picking", |
| | | query: { orderId: this.row.id, orderNo: this.row.orderNo }, |
| | | }); |
| | | }, |
| | | handleOpenBatchPicking() { |
| | | this.$router.push({ |
| | | path: '/outbound/batchpicking', |
| | | query: { orderId: this.row.id ,orderNo:this.row.orderNo}}) |
| | | this.$router.push({ |
| | | path: "/outbound/batchpicking", |
| | | query: { orderId: this.row.id, orderNo: this.row.orderNo }, |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | const platformOptions = [{label:'ç«å°2',value:'2-1'},{label:'ç«å°3',value:'3-1'}]; |
| | | const mountNode = document.createElement('div'); |
| | | const platformOptions = [ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | | ]; |
| | | const mountNode = document.createElement("div"); |
| | | document.body.appendChild(mountNode); |
| | | |
| | | // 2. è¡¨åæ°æ®ï¼é»è®¤éä¸ç«å°3ï¼ |
| | | const formData = reactive({ |
| | | selectedPlatform: platformOptions[0].value // é»è®¤ç»å®ãç«å°3ãçvalue |
| | | selectedPlatform: platformOptions[0].value, |
| | | }); |
| | | |
| | | // 3. 卿å建弹çªç»ä»¶ |
| | | 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' } |
| | | ] |
| | | const vnode = createVNode( |
| | | ElDialog, |
| | | { |
| | | title: "åºåºæä½ - éæ©åºåºç«å°", |
| | | width: "500px", |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | "onUpdate:modelValue": (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | }, |
| | | ref: 'outboundForm', |
| | | 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; |
| | | padding: "20px 0", |
| | | borderRadius: "8px", |
| | | }, |
| | | }, |
| | | { |
| | | default: () => |
| | | h( |
| | | ElForm, |
| | | { |
| | | model: formData, |
| | | rules: { |
| | | selectedPlatform: [ |
| | | { required: true, message: "è¯·éæ©åºåºç«å°", trigger: "change" }, |
| | | ], |
| | | }, |
| | | ref: "outboundForm", |
| | | labelWidth: "100px", |
| | | style: { |
| | | padding: "0 30px", |
| | | }, |
| | | }, |
| | | 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 () => { |
| | | const formRef = vnode.component.refs.outboundForm; |
| | | try { |
| | | // è¡¨åæ ¡éª |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | return; |
| | | } |
| | | [ |
| | | 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 () => { |
| | | const formRef = vnode.component.refs.outboundForm; |
| | | try { |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | return; |
| | | } |
| | | |
| | | // 4. æé 请æ±åæ°ï¼éä¸åæ®ID + éæ©çåºåºç«å°ï¼ |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | taskIds: keys, |
| | | outboundPlatform: formData.selectedPlatform // åºåºç«å° |
| | | }; |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | taskIds: keys, |
| | | outboundPlatform: formData.selectedPlatform, |
| | | }; |
| | | |
| | | // 5. è°ç¨åºåºæ¥å£ |
| | | this.http |
| | | .post("api/Task/GenerateOutboundTasks", requestParams, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | |
| | | ElMessage.success("æä½æå"); |
| | | this.showDetialBox = false; // å
³é详æ
æ¡ |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); // éç¥ç¶ç»ä»¶å·æ° |
| | | }); |
| | | // å
³éå¼¹çª |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | }); |
| | | }, |
| | | style: { |
| | | borderRadius: '4px', |
| | | padding: '8px 20px' |
| | | } |
| | | }, 'ç¡®å®åºåº') |
| | | ]) |
| | | ]) |
| | | }); |
| | | this.http |
| | | .post( |
| | | "api/Task/GenerateOutboundTasks", |
| | | requestParams, |
| | | "æ°æ®å¤çä¸" |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | ElMessage.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("请æ±å¤±è´¥ï¼è¯·ç¨åéè¯"); |
| | | }); |
| | | }, |
| | | style: { |
| | | borderRadius: "4px", |
| | | padding: "8px 20px", |
| | | }, |
| | | }, "ç¡®å®åºåº"), |
| | | ]), |
| | | ]), |
| | | } |
| | | ); |
| | | |
| | | // ç»å®appä¸ä¸æï¼ç¡®ä¿Elç»ä»¶æ£å¸¸å·¥ä½ |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | }, |
| | | outboundbatch() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | if (this.selection.length>1) { |
| | | return this.$message.error("åªè½éæ©ä¸æ¡åæ®æç»è¿è¡åæ¹åºåº"); |
| | | } |
| | | const platformOptions = [{label:'ç«å°2',value:'2-1'},{label:'ç«å°3',value:'3-1'}]; |
| | | const mountNode = document.createElement('div'); |
| | | document.body.appendChild(mountNode); |
| | | |
| | | // 2. è¡¨åæ°æ®ï¼é»è®¤éä¸ç«å°3ï¼æ°å¢å°æ°åæ®µï¼ |
| | | const formData = reactive({ |
| | | selectedPlatform: platformOptions[0].value, // é»è®¤ç»å®ãç«å°3ãçvalue |
| | | outboundDecimal: '' // æ°å¢ï¼å°æ°è¾å
¥æ¡å段 |
| | | }); |
| | | |
| | | // 3. 卿å建弹çªç»ä»¶ |
| | | const vnode = createVNode(ElDialog, { |
| | | title: 'åºåºæä½ - éæ©åºåºç«å°', |
| | | width: '500px', |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | 'onUpdate:modelValue': (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | }, |
| | | style: { |
| | | padding: '20px 0', |
| | | borderRadius: '8px' |
| | | } |
| | | }, { |
| | | default: () => h(ElForm, { |
| | | model: formData, |
| | | rules: { |
| | | selectedPlatform: [ |
| | | { required: true, message: 'è¯·éæ©åºåºç«å°', trigger: 'change' } |
| | | ], |
| | | // æ°å¢ï¼å°æ°å段éªè¯è§åï¼å¿
å¡« + ææå°æ°æ ¼å¼ï¼ |
| | | outboundDecimal: [ |
| | | { required: true, message: '请è¾å
¥å°æ°æ°å¼', trigger: 'blur' }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | // éªè¯è§åï¼æ£æ°ãæ¯æå°æ°ç¹åæå¤2ä½ï¼å¯æ ¹æ®éæ±è°æ´å°æ°ä½æ°ï¼ |
| | | const decimalReg = /^(([1-9]\d*)|0)(\.\d{1,2})?$/; |
| | | if (value && !decimalReg.test(value)) { |
| | | callback(new Error('请è¾å
¥ææçå°æ°ï¼æ£æ°ï¼æå¤2ä½å°æ°ï¼')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | ref: 'outboundForm', |
| | | labelWidth: '100px', |
| | | style: { |
| | | padding: '0 30px' |
| | | if (this.selection.length > 1) { |
| | | return this.$message.error("åªè½éæ©ä¸æ¡åæ®æç»è¿è¡åæ¹åºåº"); |
| | | } |
| | | }, [ |
| | | // åºåºç«å°éæ©é¡¹ï¼æ ¸å¿è¡¨åé¡¹ï¼ |
| | | 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(ElFormItem, { |
| | | label: 'åºåºæ°', // 坿 ¹æ®ä¸å¡éæ±ä¿®æ¹æ ç¾åï¼å¦âåºåºæ°éââééâçï¼ |
| | | prop: 'outboundDecimal', |
| | | style: { |
| | | marginBottom: '24px' |
| | | } |
| | | }, [ |
| | | h(ElInput, { |
| | | type: 'number', // æ°åç±»åï¼åçæ¯æå°æ°è¾å
¥ |
| | | placeholder: '请è¾å
¥å°æ°æ°å¼ï¼æå¤2ä½å°æ°ï¼', |
| | | modelValue: formData.outboundDecimal, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.outboundDecimal = val; |
| | | }, |
| | | style: { |
| | | width: '100%', |
| | | height: '40px', |
| | | borderRadius: '4px', |
| | | borderColor: '#dcdfe6' |
| | | }, |
| | | step: '0.01', // æ¥é¿0.01ï¼ç¹å»ä¸ä¸ç®å¤´æ¶æ0.01å¢å |
| | | precision: 2, // éå¶æå¤è¾å
¥2ä½å°æ°ï¼Element Plus屿§ï¼ |
| | | min: 0.01, // å¯éï¼éå¶æå°å¼ä¸º0.01ï¼é¿å
è¾å
¥0æè´æ° |
| | | }) |
| | | ]), |
| | | // åºé¨æé®åº |
| | | 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.outboundForm; |
| | | try { |
| | | // è¡¨åæ ¡éªï¼ä¼åæ¶æ ¡éªåºåºç«å°åå°æ°åæ®µï¼ |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | return; |
| | | 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, |
| | | outboundDecimal: "", |
| | | }); |
| | | |
| | | const vnode = createVNode( |
| | | ElDialog, |
| | | { |
| | | title: "åºåºæä½ - éæ©åºåºç«å°", |
| | | width: "500px", |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | "onUpdate:modelValue": (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | console.log(this.selection); |
| | | // 4. æé 请æ±åæ°ï¼æ°å¢å°æ°åæ®µï¼ |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | orderDetailId: keys[0], // åæ¹åºåºä»
æ¯æåæ¡æç» |
| | | outboundPlatform: formData.selectedPlatform, // åºåºç«å° |
| | | batchQuantity: formData.outboundDecimal // æ°å¢ï¼å°æ°åæ®µä¼ ç»å端 |
| | | }; |
| | | |
| | | // 5. è°ç¨åºåºæ¥å£ |
| | | this.http |
| | | .post("api/Task/GenerateOutboundBatchTasks", requestParams, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | |
| | | ElMessage.success("æä½æå"); |
| | | this.showDetialBox = false; // å
³é详æ
æ¡ |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); // éç¥ç¶ç»ä»¶å·æ° |
| | | }); |
| | | // å
³éå¼¹çª |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | }); |
| | | }, |
| | | style: { |
| | | borderRadius: '4px', |
| | | padding: '8px 20px' |
| | | } |
| | | }, 'ç¡®å®åæ¹åºåº') |
| | | ]) |
| | | ]) |
| | | }); |
| | | padding: "20px 0", |
| | | borderRadius: "8px", |
| | | }, |
| | | }, |
| | | { |
| | | default: () => |
| | | h( |
| | | ElForm, |
| | | { |
| | | model: formData, |
| | | rules: { |
| | | selectedPlatform: [ |
| | | { required: true, message: "è¯·éæ©åºåºç«å°", trigger: "change" }, |
| | | ], |
| | | outboundDecimal: [ |
| | | { required: true, message: "请è¾å
¥å°æ°æ°å¼", trigger: "blur" }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | const decimalReg = /^(([1-9]\d*)|0)(\.\d{1,2})?$/; |
| | | if (value && !decimalReg.test(value)) { |
| | | callback(new Error("请è¾å
¥ææçå°æ°ï¼æ£æ°ï¼æå¤2ä½å°æ°ï¼")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | ref: "outboundForm", |
| | | 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(ElFormItem, { |
| | | label: "åºåºæ°", |
| | | prop: "outboundDecimal", |
| | | style: { |
| | | marginBottom: "24px", |
| | | }, |
| | | }, [ |
| | | h(ElInput, { |
| | | type: "number", |
| | | placeholder: "请è¾å
¥å°æ°æ°å¼ï¼æå¤2ä½å°æ°ï¼", |
| | | modelValue: formData.outboundDecimal, |
| | | "onUpdate:modelValue": (val) => { |
| | | formData.outboundDecimal = val; |
| | | }, |
| | | style: { |
| | | width: "100%", |
| | | height: "40px", |
| | | borderRadius: "4px", |
| | | borderColor: "#dcdfe6", |
| | | }, |
| | | step: "0.01", |
| | | precision: 2, |
| | | min: 0.01, |
| | | }), |
| | | ]), |
| | | 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.outboundForm; |
| | | try { |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | return; |
| | | } |
| | | |
| | | // ç»å®appä¸ä¸æï¼ç¡®ä¿Elç»ä»¶æ£å¸¸å·¥ä½ |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | }, |
| | | |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | orderDetailId: keys[0], |
| | | outboundPlatform: formData.selectedPlatform, |
| | | batchQuantity: formData.outboundDecimal, |
| | | }; |
| | | |
| | | this.http |
| | | .post( |
| | | "api/Task/GenerateOutboundBatchTasks", |
| | | requestParams, |
| | | "æ°æ®å¤çä¸" |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | ElMessage.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("请æ±å¤±è´¥ï¼è¯·ç¨åéè¯"); |
| | | }); |
| | | }, |
| | | style: { |
| | | borderRadius: "4px", |
| | | padding: "8px 20px", |
| | | }, |
| | | }, "ç¡®å®åæ¹åºåº"), |
| | | ]), |
| | | ]), |
| | | } |
| | | ); |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | }, |
| | | setCurrent(row) { |
| | | this.$refs.singleTable.setCurrentRow(row); |
| | | }, |
| | |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.prop]); |
| | | console.log(dicItem); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } else { |
| | |
| | | return row[column.prop]; |
| | | } |
| | | } |
| | | return row[column.prop]; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .text-button { |
| | | border: 0px; |
| | |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .el-table .success-row { |
| | |
| | | .box-table .el-table { |
| | | border: 1px solid #ebeef5; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | |
| | | column.formatter = (row) => { |
| | | // æ ¡éªdetailsæ¯å¦åå¨ä¸ææ°æ® |
| | | if (row.details && row.details.length > 0) { |
| | | // æmaterielCodeåç»ç»è®¡stockQuantityæ»åï¼å¹¶è®°å½åä½ï¼å第ä¸ä¸ªé空åä½ï¼ |
| | | const materielSumMap = row.details.reduce((acc, item) => { |
| | | const materielCode = item.materielCode || 'æªç¥ç©æ'; |
| | | // æbarcode + supplyCode + BatchNo ç»å维度åç»ç»è®¡stockQuantityæ»åï¼å¹¶è®°å½åä½ï¼å第ä¸ä¸ªé空åä½ï¼ |
| | | const groupSumMap = row.details.reduce((acc, item) => { |
| | | // è·ååç»å
³é®å段ï¼ä¸ºç©ºæ¶èµäºé»è®¤å¼ |
| | | const supplyCode = item.supplyCode || 'æªç¥ä¾åºåç¼ç '; |
| | | const batchNo = item.batchNo || 'æªç¥æ¹æ¬¡å·'; |
| | | const materielCode = item.materielCode || 'æªç¥ç©æ'; // ä¿çåæç©æç¼ç |
| | | const quantity = Number(item.stockQuantity) || 0; |
| | | const unit = item.unit || ''; // è·ååä½ï¼æ å为空 |
| | | |
| | | // ç´¯å æ°é |
| | | acc[materielCode] = { |
| | | total: (acc[materielCode]?.total || 0) + quantity, |
| | | unit: acc[materielCode]?.unit || unit // ä¿ç第ä¸ä¸ªé空åä½ |
| | | // ç»ååç»é®ï¼å¯æ ¹æ®éè¦è°æ´æ¾ç¤ºæ ¼å¼ï¼ |
| | | const groupKey = `${supplyCode}|${batchNo}|${materielCode}`; |
| | | |
| | | // ç´¯å æ°éï¼ä¿ç第ä¸ä¸ªé空åä½ |
| | | acc[groupKey] = { |
| | | total: (acc[groupKey]?.total || 0) + quantity, |
| | | unit: acc[groupKey]?.unit || unit, |
| | | supplyCode, |
| | | batchNo, |
| | | materielCode |
| | | }; |
| | | return acc; |
| | | }, {}); |
| | | |
| | | // æ¯ä¸ªç©æé¡¹çæç¬ç«divï¼è·¨è¡æ¾ç¤ºï¼å
å«åä½ï¼ |
| | | const displayItems = Object.entries(materielSumMap).map(([code, data]) => { |
| | | // æ¯ä¸ªåç»é¡¹çæç¬ç«divï¼è·¨è¡æ¾ç¤ºï¼å
嫿æåç»ç»´åº¦ååä½ï¼ |
| | | const displayItems = Object.entries(groupSumMap).map(([_, data]) => { |
| | | // å¤çå使¾ç¤ºï¼æåä½åå ç©ºæ ¼æ¾ç¤ºï¼æ å䏿¾ç¤º |
| | | const unitText = data.unit ? ` ${data.unit}` : ''; |
| | | return `<div style="line-height: 1.5; white-space: normal;">${code}ï¼${data.total}${unitText}</div>`; |
| | | |
| | | // ç»è£
æ¾ç¤ºææ¬ï¼å¯æ ¹æ®éæ±è°æ´å段æ¾ç¤ºé¡ºåºåæ ¼å¼ï¼ |
| | | return `<div style="line-height: 1.5; white-space: normal; margin-bottom: 4px;"> |
| | | ä¾åºåç¼ç ï¼${data.supplyCode} | æ¹æ¬¡å·ï¼${data.batchNo} | ç©æç¼ç ï¼${data.materielCode}ï¼${data.total}${unitText} |
| | | </div>`; |
| | | }); |
| | | |
| | | const displayContent = displayItems.join(''); |
| | | return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`; |
| | | return `<div style="color: #716cf5ff; white-space: normal; word-break: break-all;">${displayContent}</div>`; |
| | | } else { |
| | | return '<span style="color: #F56C6C">空箱</span>'; |
| | | } |
| | |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "inboundOrderNo", type: "like" }, |
| | | { title: "æ«æåæ®ç¼å·ææ¡ç ", field: "inboundOrderNo", type: "like" }, |
| | | { title: "䏿¸¸åæ®ç¼å·", field: "upperOrderNo", type: "like" }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "orderType", |
| | | title: "ä¸å¡ç±»å", |
| | | field: "businessType", |
| | | type: "select", |
| | | dataKey: "inOrderType", |
| | | data: [0], |
| | | hidden:true |
| | | dataKey: "documentTypeEmun", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | |
| | | bind: { key: "createType", data: [] }, |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "returnToMESStatus", |
| | | title: "åä¼ MESç¶æ", |
| | | width: 120, |
| | | bind: { key: "createType", data:[{key:0, value:"æªåä¼ "},{key:1, value:"å·²åä¼ æå"},{key:2, value:"åä¼ å¤±è´¥"}]}, |
| | | }, |
| | | { |
| | | field: "factoryArea", |
| | | title: "ååº", |
| | | type: "string", |
| | |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | |
| | | { title: "åæ®ç¼å·", field: "orderNo", type: "like" }, |
| | | { title: "䏿¸¸åæ®ç¼å·", field: "upperOrderNo", type: "like" }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "orderType", |
| | | title: "ä¸å¡ç±»å", |
| | | field: "businessType", |
| | | type: "select", |
| | | dataKey: "outOrderType", |
| | | dataKey: "documentTypeEmun", |
| | | data: [], |
| | | hidden:true |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | |
| | | bind: { key: "createType", data: [] }, |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "returnToMESStatus", |
| | | title: "åä¼ MESç¶æ", |
| | | width: 120, |
| | | bind: { key: "createType", data:[{key:0, value:"æªåä¼ "},{key:1, value:"å·²åä¼ æå"},{key:2, value:"åä¼ å¤±è´¥"}]}, |
| | | }, |
| | | { |
| | | field: "factoryArea", |
| | | title: "ååº", |
| | | type: "string", |
| | |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | |
| | | [ |
| | | { title: "ç©æç¼å·", field: "materielCode",type: "like"}, |
| | | { title: "æ¹æ¬¡å·", field: "batchNo",type: "like"}, |
| | | { title: "æå±ä»åº", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}, |
| | | { title: "æå±ä»åº", field: "locationType",type: "select",dataKey: "locationType",data: [],}, |
| | | { title: "æå«æ¡ç ", field: "barcode",type: "like"}, |
| | | ], |
| | | [ |
| | | { title: "ä¾åºåç¼å·", field: "supplyCode",type: "like"}, |
| | | { title: "æå«åæ®ç¼å·", field: "orderNo",type: "like"}, |
| | | { title: "åºåå建æ¶é´", field: "createDate",type: "datetime"}, |
| | | |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "locationType", |
| | | title: "æå±ä»åº", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "locationType", data: [] }, |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | |
| | | field: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "locationName", |
| | | title: "è´§ä½åç§°", |
| | | type: "string", |
| | | width: 150, |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | |
| | |
| | | field: "orderStatistics", |
| | | title: "æå«ç©ææç»", |
| | | type: "string", |
| | | width: 240, |
| | | width: 630, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | private readonly IRepository<Dt_StockInfoDetail> _stockInfoDetailRepository; |
| | | private readonly IRepository<Dt_StockInfo> _stockInfoRepository; |
| | | private readonly IRepository<Dt_InboundOrder> _inboundOrderRepository; |
| | | private readonly IRepository<Dt_InboundOrderDetail> _inboundOrderDetailRepository; |
| | | private readonly IRepository<Dt_PickingRecord> _pickingRecoreRepository; |
| | | private readonly IMaterialUnitService _materialUnitService; |
| | | private readonly IOutboundOrderService _outboundOrderService; |
| | |
| | | |
| | | // å
¨å±éæéï¼ç¨äºä¿æ¤ _resourceLocks åå
¸ä¸ GetOrAdd æ TryRemove æ¶çç«äº |
| | | private static readonly object _globalLocker = new object(); |
| | | public InvokeMESService(IHttpClientFactory httpClientFactory, ILogger<InvokeMESService> logger, IRepository<Dt_FeedbackToMes> feedbacktomesRepository, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IOutStockLockInfoService outStockLockInfoService, IMaterialUnitService materialUnitService, IRepository<Dt_PickingRecord> pickingRecoreRepository, IRepository<Dt_InterfaceLog> interfacelogRepository) |
| | | public InvokeMESService(IHttpClientFactory httpClientFactory, ILogger<InvokeMESService> logger, IRepository<Dt_FeedbackToMes> feedbacktomesRepository, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IOutStockLockInfoService outStockLockInfoService, IMaterialUnitService materialUnitService, IRepository<Dt_PickingRecord> pickingRecoreRepository, IRepository<Dt_InterfaceLog> interfacelogRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository) |
| | | { |
| | | _httpClientFactory = httpClientFactory; |
| | | _logger = logger; |
| | |
| | | _materialUnitService = materialUnitService; |
| | | _pickingRecoreRepository = pickingRecoreRepository; |
| | | _interfacelogRepository = interfacelogRepository; |
| | | _inboundOrderDetailRepository = inboundOrderDetailRepository; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public async Task<WebResponseContent> BatchOrderFeedbackToMes(List<string> orderNos, int inout) |
| | | { |
| | | try |
| | | { |
| | | { |
| | | |
| | | if (inout == 1) |
| | | { |
| | |
| | | var unreports = stockinfos.Where(x => !feeds.Contains(x.PalletCode)).ToList(); |
| | | if (unreports != null && !unreports.Any()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1, Remark = "" }) |
| | | .Where(it => it.InboundOrderNo == orderNo).ExecuteCommand(); |
| | | var inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().First(x => x.InboundOrderNo == orderNo); |
| | | if (inboundOrder != null) |
| | | { |
| | | _inboundOrderDetailRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | |
| | | return WebResponseContent.Instance.Error("没æéè¦åä¼ çæ°æ®"); |
| | | } |
| | | foreach (var item in unreports) |
| | |
| | | if (result != null && result.code == 200) |
| | | { |
| | | _feedbacktomesRepository.Db.Insertable(new Dt_FeedbackToMes { OrderNo = orderNo, PalletCode = item.PalletCode, ReportStatus = 1 }).ExecuteCommand(); |
| | | |
| | | var feedstockinfos = _stockInfoRepository.Db.Queryable<Dt_StockInfo>("info").Where(info => info.StockStatus == 6) |
| | | .Where(it => SqlFunc.Subqueryable<Dt_StockInfoDetail>().Where(s => s.StockId == it.Id && s.OrderNo == orderNo).Any()) |
| | | .ToList(); |
| | | var feedstomes = _feedbacktomesRepository.Db.Queryable<Dt_FeedbackToMes>().Where(x => x.OrderNo == orderNo && x.ReportStatus == 1).Select(o => o.PalletCode).ToList(); |
| | | var feedunreports = feedstockinfos.Where(x => !feedstomes.Contains(x.PalletCode)).ToList(); |
| | | if (feedunreports != null && !feedunreports.Any()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1, Remark = "" }) |
| | | .Where(it => it.InboundOrderNo == orderNo).ExecuteCommand(); |
| | | var feedinboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().First(x => x.InboundOrderNo == orderNo); |
| | | if (feedinboundOrder != null) |
| | | { |
| | | _inboundOrderDetailRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == feedinboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2, Remark = result.message }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | _inboundOrderDetailRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | } |
| | | } |
| | |
| | | var mesResult = await FeedbackOutbound(feedModel); |
| | | if (mesResult == null || mesResult.code != 200) |
| | | { |
| | | var messages = mesResult?.message??""; |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => new Dt_OutboundOrder |
| | | { |
| | | ReturnToMESStatus = 2, |
| | | Remark = messages, |
| | | }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | | // æ´æ°æç»ä¸ºåä¼ å¤±è´¥ï¼ReturnToMESStatus=2ï¼ |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(it => new Dt_OutboundOrderDetail |
| | | { |
| | | ReturnToMESStatus = 2, |
| | | ReturnToMESStatus = 2, |
| | | documentsNO = documentNo, |
| | | }) |
| | | .Where(x => detailIds.Contains(x.Id)) |
| | |
| | | |
| | | return (flowControl: false, value: WebResponseContent.Instance.Error($"åä¼ MES失败")); |
| | | } |
| | | foreach (var record in pickingRecords.Where(x => detailIds.Contains(x.OrderDetailId)).ToList()) |
| | | { |
| | | record.ReturnToMESStatus = 1; |
| | | } |
| | | |
| | | var updates = pickingRecords.Where(x => detailIds.Contains(x.OrderDetailId)).ToList(); |
| | | updates.ForEach(x => |
| | | { |
| | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => new Dt_OutboundOrder |
| | | { |
| | | ReturnToMESStatus = 1, |
| | | ReturnToMESStatus = 1,Remark="", |
| | | OrderStatus = newStatus |
| | | }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | |
| | | .SetColumns(it => new Dt_OutboundOrder |
| | | { |
| | | ReturnToMESStatus = 1, |
| | | Remark = "", |
| | | OrderStatus = OutOrderStatusEnum.åºåºå®æ.ObjToInt(), |
| | | }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | |
| | | } |
| | | } |
| | | |
| | | return (flowControl: true, value: null); |
| | | return (flowControl: true, value: WebResponseContent.Instance.OK($"åä¼ MESæåï¼åæ®å·ï¼{orderNo}")); |
| | | } |
| | | |
| | | private async Task<WebResponseContent> HandleOutboundOrderToMESCompletion(Dt_OutboundOrder outboundOrder, string orderNo) |
| | |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 1) |
| | | .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 1, Remark = "" }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | | |
| | |
| | | { |
| | | var errorMsg = $"OrderNo: {orderNo} åä¼ MES失败ï¼é误ç ï¼{result.code}ï¼é误信æ¯ï¼{result.message ?? "æ "}"; |
| | | _logger.LogError(errorMsg); |
| | | |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(x => x.ReturnToMESStatus ==2) |
| | | .Where(x => x.OrderId == outboundOrder.Id) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 2, Remark = result.message }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | return WebResponseContent.Instance.Error(errorMsg); |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// éè´å
¥åº |
| | | /// </summary> |
| | | [Description("éè´å
¥åº")] |
| | | [Description("å
¥åº")] |
| | | Inbound = 510, |
| | | /// <summary> |
| | | /// çç¹å
¥åº |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Logging; |
| | | using SqlSugar; |
| | | using SqlSugar.Extensions; |
| | | using WIDESEA_Common.AllocateEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | |
| | | using Microsoft.Extensions.Logging; |
| | | using MailKit.Search; |
| | | using Microsoft.Extensions.Logging; |
| | | using SqlSugar; |
| | | using WIDESEA_BasicService; |
| | | using WIDESEA_Common.CommonEnum; |
| | |
| | | |
| | | return ValidationResult<(Dt_PickingRecord, Dt_OutStockLockInfo, Dt_OutboundOrderDetail)>.Success((pickingRecord, lockInfo, orderDetail)); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥éå®ä¿¡æ¯å¯¹åºçæ¡ç æ¯å¦å·²ç»ååº |
| | |
| | | #endregion |
| | | |
| | | #region ååºæä½ç§ææ¹æ³ |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥æ´ä¸ªæçæ¯å¦å·²ç»ååº |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | private async Task<WebResponseContent> HandleNoReturnItems(string orderNo, string palletCode, Dt_Task originalTask, int stockInfoId) |
| | | { |
| | | { |
| | | try |
| | | { |
| | | var locationtype = 0; |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | private async Task HandlePalletStockGoodsReturn(List<Dt_StockInfoDetail> palletStockGoods) |
| | | { |
| | |
| | | _logger.LogError($"UpdateOrderStatusForReturn失败 - OrderNo: {orderNo}, Error: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 空æç |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | private async Task<string> GenerateNewBarcode() |
| | | { |
| | |
| | | if (result1 != null && result1.code == 200) |
| | | { |
| | | var orderIds = inboundOrderDetails.Select(x => x.Id).Distinct().ToList(); |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1, Remark = "" }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => orderIds.Contains(it.Id)).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2, Remark = result1.message }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | //åºåºåä¼ MES |
| | | |
| | |
| | | |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 1) |
| | | .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 1, Remark = "" }) |
| | | .Where(x => x.Id == outboundOrder.Id) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _interfaceLog.Db.Updateable<Dt_InterfaceLog>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 1) |
| | | .Where(x => x.DocumentNo == documentNo) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | | else |
| | | { |
| | | var uporderIds = outboundOrderDetails.Select(x => x.Id).Distinct().ToList(); |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 2) |
| | | .Where(x => uporderIds.Contains(x.Id)) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 2, Remark = result.message }) |
| | | .Where(x => x.Id == outboundOrder.Id) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _interfaceLog.Db.Updateable<Dt_InterfaceLog>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 2) |
| | | .Where(x => x.DocumentNo == documentNo) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | Dt_InboundOrderDetail inboundOrderDetail = _stockInfoDetailService.Db.Queryable<Dt_InboundOrderDetail>().Where(x=>x.Barcode == barcode&& x.OrderDetailStatus !=OrderDetailStatusEnum.Over.ObjToInt()).First(); |
| | | if(inboundOrderDetail == null) |
| | | Dt_InboundOrderDetail inboundOrderDetail = _stockInfoDetailService.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.Barcode == barcode && x.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt()).First(); |
| | | if (inboundOrderDetail == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥æ¡ç {barcode}çå
¥åºæç»æè
æç»ç¶æå·²å
¥æºä»å®æ"); |
| | | } |
| | |
| | | |
| | | return WebResponseContent.Instance.OK("æ¥è¯¢éè´åæå", data: resultData); |
| | | } |
| | | catch(Exception ex) |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | |
| | | try |
| | | { |
| | | ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x => x.Details); |
| | | ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); |
| | | if (!string.IsNullOrEmpty(options.Wheres)) |
| | | { |
| | | try |
| | |
| | | .Where(x => x.Details.Any(v => v.BatchNo.Contains(param.Value.ToString()))); |
| | | } |
| | | break; |
| | | |
| | | case var name when name == nameof(Dt_StockInfo.LocationCode).FirstLetterToLower(): |
| | | case var name when name == nameof(Dt_StockInfoDetail.SupplyCode).FirstLetterToLower(): |
| | | if (!string.IsNullOrEmpty(param.Value?.ToString())) |
| | | { |
| | | sugarQueryable1 = sugarQueryable1 |
| | | .Where(x => x.LocationCode == param.Value.ToString()); |
| | | .Where(x => x.Details.Any(v => v.SupplyCode.Contains(param.Value.ToString()))); |
| | | } |
| | | break; |
| | | case var name when name == nameof(Dt_StockInfoDetail.Barcode).FirstLetterToLower(): |
| | | if (!string.IsNullOrEmpty(param.Value?.ToString())) |
| | | { |
| | | sugarQueryable1 = sugarQueryable1 |
| | | .Where(x => x.Details.Any(v => v.Barcode.Contains(param.Value.ToString()))); |
| | | } |
| | | break; |
| | | case var name when name == nameof(Dt_StockInfoDetail.OrderNo).FirstLetterToLower(): |
| | | if (!string.IsNullOrEmpty(param.Value?.ToString())) |
| | | { |
| | | sugarQueryable1 = sugarQueryable1 |
| | | .Where(x => x.Details.Any(v => v.OrderNo.Contains(param.Value.ToString()))); |
| | | } |
| | | break; |
| | | |
| | | case var name when name == nameof(Dt_LocationInfo.LocationStatus).FirstLetterToLower(): |
| | | if (!string.IsNullOrEmpty(param.Value?.ToString())) |
| | | { |
| | | sugarQueryable = sugarQueryable |
| | | .Where(x => x.LocationStatus == param.Value.ObjToInt()); |
| | | } |
| | | break; |
| | | case var name when name == nameof(Dt_StockInfo.CreateDate).FirstLetterToLower(): |
| | |
| | | } |
| | | } |
| | | EntityProperties.ValidatePageOptions(options, ref sugarQueryable1); |
| | | ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); |
| | | |
| | | ISugarQueryable<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a) => new StockViewDTO |
| | | { |
| | | LocationCode = b.LocationCode, |
| | |
| | | Layer = a.Layer, |
| | | LocationName = a.LocationName, |
| | | LocationStatus = a.LocationStatus, |
| | | LocationType = a.LocationType, |
| | | LocationType = b.LocationType, |
| | | Modifier = b.Modifier, |
| | | ModifyDate = b.ModifyDate, |
| | | PalletCode = b.PalletCode, |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | |
| | | case "documentTypeEmun": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | Type type = typeof(DocumentType); |
| | | List<int> enums = Enum.GetValues(typeof(DocumentType)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(DocumentType).GetField(((DocumentType)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | _task_HtyService = task_HtyService; |
| | | } |
| | | |
| | | public async Task TaskStatusChange(string taskNum,TaskStatusEnum taskStatusEnum) |
| | | public async Task TaskStatusChange(string taskNum, TaskStatusEnum taskStatusEnum) |
| | | { |
| | | if (int.TryParse(taskNum, out var newTaskNum)) |
| | | { |
| | | await Db.Updateable<Dt_Task>().SetColumns(it => new Dt_Task { |
| | | TaskStatus = taskStatusEnum.ObjToInt() |
| | | }) |
| | | await Db.Updateable<Dt_Task>().SetColumns(it => new Dt_Task |
| | | { |
| | | TaskStatus = taskStatusEnum.ObjToInt() |
| | | }) |
| | | .Where(it => it.TaskNum == newTaskNum) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | var feedbackresult = await _invokeMESService.FeedbackInbound(feedmodel); |
| | | if (feedbackresult != null && feedbackresult.code == 200) |
| | | { |
| | | _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1, Remark = "" }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2, Remark = feedbackresult.message }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | } |
| | | } |
| | |
| | | _logger.LogInformation($"TaskService InPickTaskCompleted: {task.TaskNum}"); |
| | | |
| | | try |
| | | { |
| | | { |
| | | // æ¥åºå |
| | | Dt_StockInfo stockInfo = await _stockRepository.Db.Queryable<Dt_StockInfo>() |
| | | .Includes(x => x.Details) |
| | |
| | | // æ´æ°åºåºéå®è®°å½ç¶æä¸ºååºå®æ |
| | | foreach (var lockInfo in returnLocks) |
| | | { |
| | | lockInfo.Status = (int)OutLockStockStatusEnum.å·²ååº; |
| | | lockInfo.Status = (int)OutLockStockStatusEnum.å·²ååº; |
| | | } |
| | | |
| | | if (returnLocks.Any()) |
| | |
| | | ); |
| | | await RecalculateOrderStatus(task.OrderNo); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation($"æçååºå®æå¤çæå - ä»»å¡å·: {task.TaskNum}, æç: {task.PalletCode}, 订å: {task.OrderNo}"); |
| | | _ = Task.Run(async () => |
| | | { |
| | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => new Dt_OutboundOrder |
| | | { |
| | | OrderStatus = newStatus, |
| | | OrderStatus = newStatus, |
| | | }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => new Dt_OutboundOrder |
| | | { |
| | | ReturnToMESStatus = 1, |
| | | ReturnToMESStatus = 1, |
| | | }).Where(x => x.OrderNo == orderNo).ExecuteCommandAsync(); |
| | | } |
| | | } |
| | |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 1) |
| | | .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 2, Remark = "" }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | | else |
| | | { |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 2) |
| | | .Where(x => x.OrderId == outboundOrder.Id) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 2, Remark = result.message }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | | } |
| | |
| | | |
| | | var stockresult = _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateTypeEnum.èªå¨å®æ : OperateTypeEnum.äººå·¥å®æ); |
| | | if (!stockresult) |
| | | { |
| | | { |
| | | _stockRepository.Db.Deleteable(stockInfo).ExecuteCommand(); |
| | | } |
| | | _stockService.StockInfoService.DeleteData(stockInfo); |