| | |
| | | |
| | | <el-form-item label="æçæ¡ç :"> |
| | | <el-input v-model="form.palletCode" placeholder="è¯·æ«æ/è¾å
¥æçæ¡ç " @keyup.enter="submit" @keyup.13="submit" |
| | | clearable maxlength="50" @paste="handlePaste" @input="handleInput" /> |
| | | clearable maxlength="50" @paste="handlePaste" @input="handleInput" ref="boxCodeInput" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | open() { |
| | | this.show = true |
| | | this.getData(); |
| | | this.$nextTick(() => { |
| | | this.focusInput() |
| | | }) |
| | | }, |
| | | |
| | | async getData() { |
| | |
| | | async submit() { |
| | | if (!this.form.palletCode) { |
| | | this.$message.warning('请è¾å
¥æçæ¡ç ') |
| | | this.focusInput() |
| | | return |
| | | } |
| | | |
| | |
| | | ) |
| | | |
| | | if (status) { |
| | | this.$message.success("ç»çæå") |
| | | this.show = false |
| | | this.$emit('refresh') |
| | | this.$message.success("ç»çæå"); |
| | | // æ¸
空è¾å
¥æ¡æ°æ® |
| | | this.form.palletCode = ''; |
| | | // èç¦å¹¶éä¸è¾å
¥æ¡ |
| | | this.focusAndSelectInput(); |
| | | } else { |
| | | this.$message.error(message || 'æä½å¤±è´¥') |
| | | this.$message.error(message || 'æä½å¤±è´¥'); |
| | | // 失败æ¶ä¸æ¸
çæ°æ®ï¼ä½èç¦å¹¶éä¸è¾å
¥æ¡ï¼æ¹ä¾¿ä¿®æ¹ |
| | | this.focusAndSelectInput(); |
| | | } |
| | | } catch (error) { |
| | | this.$message.error('请æ±å¼å¸¸') |
| | | this.$message.error('请æ±å¼å¸¸'); |
| | | // å¼å¸¸æ¶ä¹ä¸æ¸
çæ°æ® |
| | | this.focusAndSelectInput(); |
| | | } |
| | | }, |
| | | |
| | |
| | | handlePaste(e) { |
| | | // ç²è´´æ¶èªå¨æäº¤ |
| | | setTimeout(this.submit, 100) |
| | | }, |
| | | |
| | | // èç¦å¹¶éä¸è¾å
¥æ¡ |
| | | focusAndSelectInput() { |
| | | this.$nextTick(() => { |
| | | setTimeout(() => { |
| | | const inputRef = this.$refs.boxCodeInput; |
| | | if (inputRef) { |
| | | // Element Plus/Element UI çå¤çæ¹å¼ |
| | | const inputEl = inputRef.$el ? inputRef.$el.querySelector('input') : inputRef; |
| | | if (inputEl) { |
| | | inputEl.focus(); |
| | | inputEl.select(); |
| | | } |
| | | } |
| | | }, 100); |
| | | }); |
| | | }, |
| | | |
| | | // åªèç¦è¾å
¥æ¡ï¼ä¸æ¸
ç©ºæ°æ®ï¼ |
| | | focusInput() { |
| | | this.$nextTick(() => { |
| | | const inputRef = this.$refs.boxCodeInput; |
| | | if (inputRef) { |
| | | const inputEl = inputRef.$el ? inputRef.$el.querySelector('input') : inputRef; |
| | | inputEl?.focus(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // æ¸
ç©ºè¡¨åæ°æ® |
| | | clearForm() { |
| | | this.form.palletCode = ''; |
| | | // 䏿¸
空 locationTypeï¼ä¿æåºåéæ© |
| | | } |
| | | }, |
| | | watch: { |
| | | show(val) { |
| | | if (val) { |
| | | this.$nextTick(() => { |
| | | this.focusInput() |
| | | }) |
| | | } else { |
| | | // å
³éå¼¹çªæ¶æ¸
空表å |
| | | this.clearForm(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-alert :title="error" type="error" show-icon closable @close="error = ''" /> |
| | | </div> |
| | | |
| | | <!-- æªç»çå表 --> |
| | | <div class="unpallet-section compact"> |
| | | <el-card shadow="hover" class="compact-card unpallet-card"> |
| | | <div slot="header" class="compact-header"> |
| | | <span><i class="el-icon-tickets"></i> æªç»çæ¡ç </span> |
| | | <span class="list-actions"> |
| | | <el-tag type="primary" size="small">æªç»ç {{ totalStockCount }}</el-tag> |
| | | </span> |
| | | </div> |
| | | |
| | | |
| | | <div class="table-container"> |
| | | <el-table :data="unpalletMaterials" stripe style="width: 100%" height="100%" size="small" v-loading="unpalletBarcodesLoading"> |
| | | <el-table-column type="index" label="åºå·" width="60" align="center"></el-table-column> |
| | | <el-table-column prop="barcode" label="æ¡ç " min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="materielCode" label="ç©æç¼ç " min-width="150" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="batchNo" label="æ¹æ¬¡" min-width="150" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="orderQuantity" label="æ°é" min-width="130" align="right"></el-table-column> |
| | | <el-table-column prop="unit" label="åä½" width="80" align="center"></el-table-column> |
| | | <el-table-column prop="supplyCode" label="ä¾åºå" min-width="130" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | |
| | | <!-- ç©æå表 - åºå®é«åº¦å¸¦æ»å¨æ¡ --> |
| | | <div class="material-list compact"> |
| | | <el-card shadow="hover" class="compact-card"> |
| | |
| | | <span><i class="el-icon-tickets"></i> ç»çæ°æ®</span> |
| | | <span class="list-actions"> |
| | | <el-tag type="primary" size="small">å
± {{ materials.length }} æ¡</el-tag> |
| | | <el-tag type="primary" size="small">æªç»ç {{ totalStockCount }}</el-tag> |
| | | <el-tag type="primary" size="small">æªå
¥åºæ°é {{ totalStockSum }}{{ uniqueUnit }}</el-tag> |
| | | <el-tag v-if="trayBarcode" type="success" size="small">æç: {{ trayBarcode }}</el-tag> |
| | | <el-tag v-if="form.warehouseType" type="info" size="small">ä»åº: {{ currentWarehouseName }}</el-tag> |
| | |
| | | error: '', |
| | | debugMode: false, |
| | | currentFocus: 'warehouse', |
| | | |
| | | unpalletBarcodes:[], |
| | | unpalletBarcodesLoading: false, |
| | | unpalletMaterials: [], // æªç»çè¯¦ç»æ°æ®å表 |
| | | |
| | | // æ«ç æªç¸å
³åé |
| | | scanCode: '', |
| | |
| | | this.initwarehouseTypes(); // åå§åä»åº |
| | | this.initLocationTypes(); // åå§åä»åºåºå |
| | | this.fetchStockStatistics(); // å è½½ç»è®¡æ°æ® |
| | | this.fetchUnpalletMaterialDetails(); |
| | | }, 300); |
| | | }); |
| | | } |
| | |
| | | this.backData = []; |
| | | this.$refs.palletForm?.reset(); |
| | | this.fetchStockStatistics(); // åæ®å·åäºï¼å·æ°ç»è®¡ |
| | | this.fetchUnpalletMaterialDetails(); |
| | | } |
| | | } |
| | | }, |
| | |
| | | callback(new Error('è¯·éæ©ä»åºåºå')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | |
| | | // æ ¹æ®æ¡ç å表è·åè¯¦ç»æ°æ® |
| | | async fetchUnpalletMaterialDetails() { |
| | | try { |
| | | // å°è¯è°ç¨æ¥å£è·åè¯¦ç»æ°æ® |
| | | // 注æï¼å¦æè¿ä¸ªæ¥å£ä¸åå¨ï¼å¯ä»¥æ³¨éæææ ¹æ®å®é
APIè°æ´ |
| | | const response = await http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo='+this.docNo, { |
| | | |
| | | }); |
| | | |
| | | console.log('æªç»çæ°æ®:', response.data); |
| | | |
| | | |
| | | if (response.status && Array.isArray(response.data)) { |
| | | this.unpalletMaterials = response.data; |
| | | this.unpalletBarcodes = response.data.map(item => item.barcode || ''); |
| | | this.totalStockCount = response.data.length; |
| | | } else { |
| | | // 妿æ¥å£è¿åæ ¼å¼ä¸åï¼å°è¯å
¶ä»æ¹å¼ |
| | | // 妿æ¥å£ä¸åå¨ï¼è¿éä¼è¿å
¥catchï¼è®¾ç½®ä¸ºç©ºæ°ç» |
| | | this.unpalletMaterials = []; |
| | | } |
| | | } catch (err) { |
| | | console.warn('è·åæªç»çè¯¦ç»æ°æ®æ¥å£å¯è½ä¸åå¨ï¼ä½¿ç¨æ¡ç å表æ¾ç¤ºï¼', err); |
| | | // 妿æ¥å£ä¸åå¨ï¼å°æ¡ç å表转æ¢ä¸ºç®åçæ¾ç¤ºæ ¼å¼ |
| | | // æè
ä¿æä¸ºç©ºï¼è®©ç¨æ·ç¥ééè¦éæ©ä»åºååºåæ¥æ¥çè¯¦ç»æ°æ® |
| | | this.unpalletMaterials = this.unpalletBarcodes.map(barcode => ({ |
| | | barcode: barcode, |
| | | materielCode: '-', |
| | | batchNo: '-', |
| | | stockQuantity: '-', |
| | | unit: '-', |
| | | supplyCode: '-', |
| | | warehouseType: '-' |
| | | })); |
| | | } |
| | | }, |
| | | /** |
| | |
| | | console.log('ä»åºåºåéªè¯éè¿:', value); |
| | | // åºåéæ©åï¼èªå¨èç¦å°æçè¾å
¥æ¡ |
| | | this.focusLocationSelect(); |
| | | // å·æ°æªç»çæ°æ®ï¼æ ¹æ®éæ©çä»åºååºåè¿æ»¤ï¼ |
| | | } |
| | | }); |
| | | }, 100); |
| | |
| | | this.trayBarcode = ''; |
| | | this.barcode = ''; |
| | | this.materials = []; |
| | | this.unpalletBarcodes = []; |
| | | this.unpalletMaterials = []; |
| | | this.loading = false; |
| | | this.error = ''; |
| | | this.scanCode = ''; |
| | |
| | | }); |
| | | }); |
| | | |
| | | const removeIndex = this.unpalletMaterials.findIndex(item => item.barcode === currentBarcode); |
| | | if (removeIndex > -1) { |
| | | this.unpalletMaterials.splice(removeIndex, 1); // å 餿ªç»çå¯¹åºæ°æ® |
| | | this.unpalletBarcodes = this.unpalletMaterials.map(item => item.barcode || ''); // æ´æ°æ¡ç æ°ç» |
| | | this.totalStockCount = Math.max(0, this.totalStockCount - 1); |
| | | } |
| | | |
| | | this.$message({ |
| | | message: `æåæ·»å æ¡ç : ${currentBarcode}`, |
| | | type: 'success', |
| | |
| | | border: 1px solid #DCDFE6; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .unpallet-section.compact { |
| | | margin-bottom: 8px; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .unpallet-card { |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .unpallet-barcode-list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 6px; |
| | | padding: 8px 0; |
| | | max-height: 180px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .unpallet-barcode-list>>>.el-tag { |
| | | cursor: pointer; |
| | | max-width: calc(33.333% - 4px); |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | @media (max-width: 768px) { |
| | | .unpallet-barcode-list>>>.el-tag { |
| | | max-width: calc(50% - 4px); |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span class="less-style">ç©æç¼å·ï¼ {{ row.materielCode }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span class="less-style" |
| | | >éæ±æ°éï¼ {{ row.orderQuantity }} |
| | | </span> |
| | | <span class="less-style">éæ±æ°éï¼ {{ row.qty }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span :class="selectionClass" |
| | | >已鿰éï¼ {{ selectionSum }} |
| | | </span> |
| | | <span :class="selectionClass">已鿰éï¼ {{ selectionSum }} </span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="getData(false)" |
| | | >{{ kcname }}</el-link |
| | | > --> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | |
| | | @click="getData" |
| | | >å·æ°</el-link |
| | | > |
| | | <!-- <el-link |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="revokeAssign" |
| | | >æ¤éåé
</el-link |
| | | > --> |
| | | @click="openOutboundDialog" |
| | | >ç´æ¥åºåº</el-link |
| | | > |
| | | </el-col> |
| | | </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" |
| | |
| | | height="500px" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | label="åºå·" |
| | |
| | | </el-table> |
| | | </div> |
| | | <template #footer> |
| | | <!-- <el-button type="primary" size="small" @click="outbound" |
| | | >ç´æ¥åºåº</el-button |
| | | > |
| | | <el-button type="primary" size="small" @click="lockStock" |
| | | >éå®åºå</el-button |
| | | > --> |
| | | <!-- 廿éå®åºåæé®ï¼åªä¿çå
³éæé® --> |
| | | <el-button type="danger" size="small" @click="showDetialBox = false" |
| | | >å
³é</el-button |
| | | > |
| | | </template> |
| | | </vol-box> |
| | | |
| | | <!-- åºåºç«å°éæ©å¼¹çªï¼éææ¨¡æ¿å®ç°ï¼ --> |
| | | <el-dialog |
| | | v-model="showOutboundDialog" |
| | | title="åºåºæä½ - éæ©åºåºç«å°" |
| | | width="500px" |
| | | :append-to-body="true" |
| | | > |
| | | <el-form |
| | | :model="outboundForm" |
| | | :rules="outboundRules" |
| | | ref="outboundFormRef" |
| | | label-width="100px" |
| | | style="padding: 0 20px" |
| | | > |
| | | <el-form-item label="åºåºç«å°" prop="selectedPlatform" style="margin-bottom: 24px"> |
| | | <el-select |
| | | v-model="outboundForm.selectedPlatform" |
| | | placeholder="è¯·éæ©åºåºç«å°ï¼3-12ï¼" |
| | | style="width: 100%; height: 40px" |
| | | > |
| | | <el-option |
| | | v-for="platform in platformOptions" |
| | | :key="platform.value" |
| | | :label="platform.label" |
| | | :value="platform.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="showOutboundDialog = false" style="margin-right: 8px">åæ¶</el-button> |
| | | <el-button type="primary" @click="confirmOutbound">ç¡®å®åºåº</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | import { fa } from "element-plus/es/locales.mjs"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | | return { |
| | | row: null, |
| | | kcname: "", |
| | | pkcx: false, |
| | | row: null, // æ¥æ¶ç¶ç»ä»¶ä¼ éç宿´æ°æ®ï¼å
嫿ç»IDéåï¼ |
| | | showDetialBox: false, |
| | | tableData: [], |
| | | originalTableData: [], // åå¨åå§æ°æ®ï¼ç¨äºçé |
| | | tableColumns: [ |
| | | { |
| | | prop: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | type: "string", |
| | | width: 180, |
| | | }, |
| | | { |
| | | prop: "useableQuantity", |
| | | title: "å¯ç¨æ°é", |
| | | type: "string", |
| | | }, |
| | | { prop: "materielCode", title: "ç©æç¼å·", type: "string", width: 150 }, |
| | | { prop: "barcode", title: "ç©ææ¡ç ", type: "string", width: 150 }, |
| | | { prop: "palletCode", title: "æçç¼å·", type: "string", width: 150 }, |
| | | { prop: "locationCode", title: "è´§ä½ç¼å·", type: "string", width: 180 }, |
| | | { prop: "useableQuantity", title: "å¯ç¨æ°é", type: "string" }, |
| | | ], |
| | | selection: [], |
| | | selectionSum: 0, |
| | | selection: [], // éä¸çåºåæ°æ® |
| | | selectionSum: 0, // 已鿰鿻å |
| | | selectionClass: "less-style", |
| | | originalQuantity: 0, |
| | | |
| | | // çéè¡¨åæ°æ® |
| | | filterForm: { |
| | | materielCode: "", |
| | | barcode: "", |
| | | palletCode: "", |
| | | locationCode: "" |
| | | }, |
| | | |
| | | // åºåºå¼¹çªç¸å
³æ°æ® |
| | | showOutboundDialog: false, |
| | | outboundForm: { selectedPlatform: "" }, // 表åç»å®æ°æ® |
| | | outboundRules: { |
| | | selectedPlatform: [ |
| | | { required: true, message: "è¯·éæ©åºåºç«å°", trigger: "change" }, |
| | | ], |
| | | }, |
| | | platformOptions: [ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | | ], |
| | | pkcx: false, // æ°å¢ï¼é»è®¤falseï¼å¦æéè¦å¯ä»ç¶ç»ä»¶ä¼ éï¼ |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | console.log(row); |
| | | this.row = row; |
| | | // æ¥æ¶ç¶ç»ä»¶ä¼ éçæ°æ®ï¼å
嫿ç»IDéååç©æä¿¡æ¯ï¼ |
| | | open(data) { |
| | | this.row = data; // dataç»æï¼{materielCode, materielName, qty, orderNo, detailIds, mainOrderId, groupRow} |
| | | this.showDetialBox = true; |
| | | this.originalQuantity = this.row.lockQuantity; |
| | | this.selectionSum = this.row.lockQuantity; |
| | | this.getData(); |
| | | if (this.selectionSum == this.row.orderQuantity) { |
| | | this.selectionClass = "equle-style"; |
| | | } else if (this.selectionSum < this.row.orderQuantity) { |
| | | this.selectionClass = "less-style"; |
| | | } else { |
| | | this.selectionClass = "more-style"; |
| | | } |
| | | this.getData(); // å è½½åºåæ°æ® |
| | | this.updateSelectionClass(); // åå§åå·²éæ°éæ ·å¼ |
| | | console.log("æ¥æ¶çåç»æç»IDéåï¼", this.row.detailIds); |
| | | console.log("æ¥è¯¢åºåçç©æç¼ç ï¼", this.row.materielCode); |
| | | }, |
| | | lockStock() { |
| | | |
| | | // æå¼åºåºå¼¹çª |
| | | openOutboundDialog() { |
| | | if (this.selection.length === 0) { |
| | | return ElMessage.error("è¯·éæ©åºåæ°æ®"); |
| | | } |
| | | // æ ¡éªæç»IDéå |
| | | if (!this.row?.detailIds || this.row.detailIds.length === 0) { |
| | | return ElMessage.error("没æè·åå°åæ®æç»IDï¼æ æ³åºåº"); |
| | | } |
| | | // é置表åé¿å
æ®çå¼ |
| | | this.outboundForm.selectedPlatform = ""; |
| | | this.showOutboundDialog = true; |
| | | }, |
| | | |
| | | // æ ¸å¿ä¿®æ¹ï¼URLæ¼æ¥ä¼ éint[] orderDetailIdï¼éå¤åæ°åï¼åstationï¼è¯·æ±ä½ä¼ åºåæ°æ® |
| | | confirmOutbound() { |
| | | this.$refs.outboundFormRef.validate((valid) => { |
| | | if (!valid) return; |
| | | |
| | | // æ ¡éªéä¸åºååæç»ID |
| | | if (this.selection.length <= 0) { |
| | | return this.$message.error("请å¾éåºåæ°æ®"); |
| | | } |
| | | if (!this.row?.detailIds || this.row.detailIds.length === 0) { |
| | | return this.$message.error("没æè·åå°åæ®æç»IDï¼æ æ³åºåº"); |
| | | } |
| | | |
| | | try { |
| | | // 1. 转æ¢IDä¸ºæ´æ°æ°ç»ï¼ç¡®ä¿å端è½è¯å«ä¸ºint[]ï¼ |
| | | const orderDetailId = this.row.detailIds.map(id => { |
| | | const num = Number(id); |
| | | if (isNaN(num) || !Number.isInteger(num)) { |
| | | throw new Error(`ID ${id} 䏿¯ææçæ´æ°`); |
| | | } |
| | | return num; |
| | | }); |
| | | |
| | | // 2. æ¼æ¥URLï¼int[] ç¨éå¤åæ°åæ ¼å¼ï¼?orderDetailId=1&orderDetailId=2&...ï¼ |
| | | let url = "api/Task/GenerateOutboundTask"; |
| | | // æ¼æ¥IDæ°ç»åæ° |
| | | const idParams = orderDetailId.map(id => `orderDetailId=${id}`).join("&"); |
| | | // æ¼æ¥ç«å°åæ° |
| | | const stationParam = `station=${encodeURIComponent(this.outboundForm.selectedPlatform)}`; |
| | | // 宿´URLï¼å¤çåæ°æ¼æ¥é»è¾ï¼ |
| | | const fullUrl = idParams |
| | | ? `${url}?${idParams}&${stationParam}` |
| | | : `${url}?${stationParam}`; |
| | | |
| | | console.log("åºåºè¯·æ±URLï¼", fullUrl); |
| | | |
| | | // 3. åé请æ±ï¼URLæ¼æ¥IDåç«å°ï¼è¯·æ±ä½ä¼ åºåæ°æ®ï¼éé
FromBodyï¼ |
| | | this.http |
| | | .post(fullUrl, 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(); // å·æ°ç¶ç»ä»¶æ°æ® |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | | console.error("åºåºå¤±è´¥ï¼", err); |
| | | this.$message.error(`åºåºå¤±è´¥ï¼${err.message || '请ç¨åéè¯'}`); |
| | | }); |
| | | } catch (err) { |
| | | this.$message.error(err.message); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // æç¬¬ä¸ä¸ªç©æç¼ç æ¥è¯¢åºåæ°æ® |
| | | getData() { |
| | | const url = "api/StockInfo/GetSelectViewDTOs?materielCode="; |
| | | // 使ç¨ç¶ç»ä»¶ä¼ éçç©æç¼ç ï¼ç¬¬ä¸ä¸ªæç»çç¼ç ï¼ |
| | | this.http |
| | | .post( |
| | | "api/OutboundOrderDetail/LockOutboundStock?id=" + this.row.id, |
| | | 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(); |
| | | }); |
| | | }); |
| | | }, |
| | | outbound() { |
| | | 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, 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(); |
| | | }); |
| | | }); |
| | | }, |
| | | getData(a) { |
| | | if (!a) this.pkcx = !this.pkcx; |
| | | let url = this.pkcx |
| | | ? "api/StockInfo/GetStockSelectViews?materielCode=" |
| | | : "api/StockInfo/GetStockSelectViews?materielCode="; |
| | | this.kcname = this.pkcx ? "ç«åºåºå" : "å¹³åºåºå"; |
| | | this.http |
| | | .post( |
| | | url + this.row.materielCode + "&orderId=" + this.row.orderId, |
| | | url + this.row.materielCode + "&orderNo=" + (this.row.upperOrderNo || this.row.orderNo), |
| | | null, |
| | | "æ¥è¯¢ä¸" |
| | | ) |
| | | .then((x) => { |
| | | this.tableData = x; |
| | | this.tableData = x || []; |
| | | this.originalTableData = [...this.tableData]; // ä¿ååå§æ°æ® |
| | | // å·æ°åæ¸
空ä¹åçéæ©åè®¡æ° |
| | | this.clearSelection(); |
| | | this.selectionSum = 0; |
| | | this.originalQuantity = 0; |
| | | this.updateSelectionClass(); |
| | | // å·æ°åéç½®ç鿡件 |
| | | this.resetFilter(); |
| | | }) |
| | | .catch((err) => { |
| | | console.error("åºåæ¥è¯¢å¤±è´¥ï¼", err); |
| | | ElMessage.error("åºåæ¥è¯¢å¤±è´¥ï¼è¯·ç¨åéè¯"); |
| | | this.tableData = []; |
| | | this.originalTableData = []; |
| | | }); |
| | | }, |
| | | |
| | | // æ¤éæå®åºåï¼å¦æéè¦ï¼ |
| | | revokeAssign() { |
| | | console.log(this.row); |
| | | this.http |
| | | .post( |
| | | "api/OutboundOrderDetail/RevokeLockOutboundStock?id=" + this.row.id, |
| | | null, |
| | | "æ°æ®å¤çä¸" |
| | | ) |
| | | .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.row?.detailIds || this.row.detailIds.length === 0) { |
| | | return ElMessage.error("没æè·åå°åæ®æç»IDï¼æ æ³æ¤é"); |
| | | } |
| | | |
| | | try { |
| | | // IDè½¬ä¸ºæ´æ°æ°ç»ï¼æ¼æ¥URL |
| | | const detailIds = this.row.detailIds.map(id => Number(id)); |
| | | const idParams = detailIds.map(id => `detailIds=${id}`).join("&"); |
| | | const url = `api/OutboundOrderDetail/RevokeLockOutboundStock?id=${this.row.mainOrderId}&${idParams}`; |
| | | |
| | | this.http |
| | | .post(url, null, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | ElMessage.success("æ¤éæå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }); |
| | | } catch (err) { |
| | | this.$message.error(`æ¤é失败ï¼${err.message}`); |
| | | } |
| | | }, |
| | | |
| | | // å¤çè¡¨æ ¼éæ©ååï¼è®¡ç®å·²éæ°éï¼ |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | this.selectionSum = |
| | | val.reduce( |
| | | (accumulator, currentValue) => |
| | | accumulator + currentValue["useableQuantity"], |
| | | 0 |
| | | ) + this.originalQuantity; |
| | | if (this.selectionSum == this.row.orderQuantity) { |
| | | // 计ç®å·²éæ°éï¼è½¬æ°åé¿å
åç¬¦ä¸²æ¼æ¥ï¼ |
| | | this.selectionSum = val.reduce( |
| | | (acc, curr) => acc + Number(curr.useableQuantity || 0), |
| | | 0 |
| | | ) + this.originalQuantity; |
| | | this.updateSelectionClass(); |
| | | }, |
| | | |
| | | // æ´æ°å·²éæ°éæ ·å¼ï¼å¯¹æ¯åç»æ»éæ±æ°éï¼ |
| | | updateSelectionClass() { |
| | | if (!this.row) return; |
| | | 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"; |
| | | } |
| | | }, |
| | | |
| | | // åæ¢è¡¨æ ¼éæ© |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach((row) => { |
| | | this.$refs.singleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | rows |
| | | ? rows.forEach((row) => this.$refs.singleTable.toggleRowSelection(row)) |
| | | : this.clearSelection(); |
| | | }, |
| | | |
| | | // æ¸
ç©ºéæ© |
| | | clearSelection() { |
| | | if (this.$refs.singleTable) { |
| | | this.$refs.singleTable.clearSelection(); |
| | | } |
| | | }, |
| | | clearSelection() { |
| | | this.$refs.singleTable.clearSelection(); |
| | | }, |
| | | |
| | | // è¡ç¹å»äºä»¶ |
| | | handleRowClick(row) { |
| | | this.$refs.singleTable.toggleRowSelection(row); |
| | | }, |
| | | |
| | | // 徿 æé®ç¹å»å 使¹æ³ï¼å¯æ ¹æ®éæ±æ©å±ï¼ |
| | | 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> |
| | | |
| | | <style scoped> |
| | | .less-style { |
| | | color: black; |
| | |
| | | |
| | | .more-style { |
| | | color: red; |
| | | } |
| | | |
| | | /* çéåºåæ ·å¼ä¼å */ |
| | | .filter-area :deep(.el-form-item) { |
| | | margin-bottom: 0; |
| | | margin-right: 10px; |
| | | } |
| | | </style> |
| | | |
| | |
| | | |
| | | .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 { |
| | |
| | | <div class="box-table" style="margin-top: 1%"> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="tableData" |
| | | :data="groupedTableData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | @current-change="handleCurrentChange" |
| | |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" |
| | | :key="index" |
| | | :prop="item.prop" |
| | | :label="item.title" |
| | | :width="item.width" |
| | | prop="materielCode" |
| | | label="ç©æç¼å·" |
| | | width="120" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="materielName" |
| | | label="ç©æåç§°" |
| | | width="150" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="batchNo" |
| | | label="æ¹æ¬¡å·" |
| | | width="90" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="supplyCode" |
| | | label="ä¾åºåç¼å·" |
| | | width="90" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="orderQuantity" |
| | | label="åæ®æ°é" |
| | | width="90" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="lockQuantity" |
| | | label="é宿°é" |
| | | width="90" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="overOutQuantity" |
| | | label="å·²åºæ°é" |
| | | width="90" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="moveQty" |
| | | label="æªææ°é" |
| | | width="90" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="åä½" |
| | | width="80" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="orderDetailStatus" |
| | | label="订åæç»ç¶æ" |
| | | width="90" |
| | | align="center" |
| | | > |
| | | <template #default="scoped"> |
| | | <div v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | <el-tag size="small"> |
| | | {{ getDictionaryForGroup(scoped.row) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="assignStock" |
| | | label="æå®åºå" |
| | | width="90" |
| | | align="center" |
| | | :hidden="mainBusinessType !== '22'" |
| | | > |
| | | <template #default="scoped"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | content="æå®åºå" |
| | | placement="bottom" |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | :disabled="getButtonEnable('assignStock', scoped.row)" |
| | | @click="handleAssignStock(scoped.row)" |
| | | > |
| | | <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> |
| | | </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> |
| | | <i class="el-icon-s-grid" style="font-size: 22px"></i> |
| | | </el-link> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="viewDetail" |
| | | label="åºåºè¯¦ç»" |
| | | width="90" |
| | | align="center" |
| | | > |
| | | <template #default="scoped"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | content="æ¥çåºåºè¯¦ç»" |
| | | placement="bottom" |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | @click="handleViewDetail(scoped.row)" |
| | | > |
| | | <i class="el-icon-s-operation" style="font-size: 22px"></i> |
| | | </el-link> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="detailCount" |
| | | label="æç»æ°é" |
| | | width="80" |
| | | align="center" |
| | | > |
| | | <template #default="scoped"> |
| | | <el-tag type="info" size="small"> |
| | | {{ scoped.row.detailCount }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | flag: false, |
| | | currentRow: null, |
| | | selection: [], |
| | | tableData: [], |
| | | mainBusinessType: null, // æ°å¢ï¼åå¨ä¸»åæ®çbusinessType |
| | | tableColumns: [ |
| | | { |
| | | prop: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "orderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 120, |
| | | }, |
| | | { |
| | | prop: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "supplyCode", |
| | | title: "ä¾åºåç¼å·", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "overOutQuantity", |
| | | title: "å·²åºæ°é", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "moveQty", |
| | | title: "æªææ°é", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 80, |
| | | }, |
| | | { |
| | | prop: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "tag", |
| | | width: 90, |
| | | bindKey: "orderDetailStatusEnum", |
| | | }, |
| | | { |
| | | prop: "assignStock", |
| | | title: "æå®åºå", |
| | | type: "icon", |
| | | width: 90, |
| | | hidden: true, // é»è®¤éè |
| | | icon: "el-icon-s-grid", |
| | | }, |
| | | { |
| | | prop: "viewDetail", |
| | | title: "åºåºè¯¦ç»", |
| | | type: "icon", |
| | | width: 90, |
| | | icon: "el-icon-s-operation", |
| | | }, |
| | | { |
| | | prop: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | }, |
| | | { |
| | | prop: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | tableData: [], // åå§æ°æ® |
| | | groupedTableData: [], // åç»åçæ°æ® |
| | | mainBusinessType: null, // åå¨ä¸»åæ®çbusinessType |
| | | paginations: { |
| | | sort: "id", |
| | | order: "desc", |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleAssignStockColumn() { |
| | | const assignStockColumn = this.tableColumns.find( |
| | | (item) => item.prop === "assignStock" |
| | | ); |
| | | if (assignStockColumn) { |
| | | // businessType为22æ¶æ¾ç¤ºï¼å¦åéè |
| | | assignStockColumn.hidden = this.mainBusinessType !=='22'; |
| | | } |
| | | // æ ¹æ®ç©æç¼å·ãæ¹æ¬¡ãä¾åºååç»æ°æ® |
| | | groupDataByMaterial() { |
| | | const groups = {}; |
| | | |
| | | this.tableData.forEach(item => { |
| | | // æå»ºåç»é®ï¼æ¹æ¬¡åä¾åºåå¯ä»¥ä¸ºç©º |
| | | const groupKey = `${item.materielCode}_${item.batchNo || ''}_${item.supplyCode || ''}`; |
| | | |
| | | if (!groups[groupKey]) { |
| | | // å建æ°åç» |
| | | groups[groupKey] = { |
| | | materielCode: item.materielCode, |
| | | materielName: item.materielName, |
| | | batchNo: item.batchNo || '-', |
| | | supplyCode: item.supplyCode || '-', |
| | | orderQuantity: 0, |
| | | lockQuantity: 0, |
| | | overOutQuantity: 0, |
| | | moveQty: 0, |
| | | unit: item.unit, |
| | | orderDetailStatus: item.orderDetailStatus, |
| | | detailCount: 0, |
| | | originalDetails: [] // ä¿ååå§æç»æ°æ® |
| | | }; |
| | | } |
| | | |
| | | // ç´¯å æ°é |
| | | groups[groupKey].orderQuantity += item.orderQuantity || 0; |
| | | groups[groupKey].lockQuantity += item.lockQuantity || 0; |
| | | groups[groupKey].overOutQuantity += item.overOutQuantity || 0; |
| | | groups[groupKey].moveQty += item.moveQty || 0; |
| | | groups[groupKey].detailCount += 1; |
| | | groups[groupKey].originalDetails.push(item); |
| | | |
| | | // å¦æç¶æä¸åï¼å¯ä»¥ç¨ç¬¬ä¸ä¸ªç¶ææç¹æ®å¤ç |
| | | // è¿é使ç¨ç¬¬ä¸ä¸ªæç»çç¶æ |
| | | }); |
| | | |
| | | // 转æ¢ä¸ºæ°ç» |
| | | this.groupedTableData = Object.values(groups); |
| | | |
| | | console.log('åç»åçæ°æ®:', this.groupedTableData); |
| | | }, |
| | | |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | |
| | | this.mainBusinessType = row.businessType; |
| | | this.getDictionaryData(); |
| | | this.getData(); |
| | | this.toggleAssignStockColumn(); |
| | | }, |
| | | |
| | | getData() { |
| | | var wheres = [{ name: "orderId", value: this.row.id }]; |
| | | var param = { |
| | |
| | | .post("api/OutboundOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | this.tableData = x.rows; |
| | | this.toggleAssignStockColumn(); // æ°æ®å è½½åéæ°ç¡®è®¤åæ¾é |
| | | // åç»æ°æ® |
| | | this.groupDataByMaterial(); |
| | | }); |
| | | }, |
| | | tableButtonClick(row, column) { |
| | | if (column.prop == "assignStock") { |
| | | this.$refs.child.open(row); |
| | | } else if (column.prop == "NoStockOut") { |
| | | this.$refs.NoStockOut.open(row); |
| | | |
| | | // éç¹ä¿®æ¹ï¼å¤çæå®åºåç¹å»äºä»¶ - ä¼ é宿´çåç»æç»ä¿¡æ¯ |
| | | handleAssignStock(row) { |
| | | // ä¼ é宿´çåç»æç»æ°æ®ï¼å
嫿æåå§æç»IDåç©æä¿¡æ¯ï¼ |
| | | if (row.originalDetails && row.originalDetails.length > 0) { |
| | | this.$refs.child.open({ |
| | | // ç©æåºæ¬ä¿¡æ¯ï¼å第ä¸ä¸ªæç»çä¿¡æ¯ï¼ |
| | | materielCode: row.originalDetails[0].materielCode, |
| | | materielName: row.originalDetails[0].materielName, |
| | | // åç»åçæ»éæ±æ°é |
| | | qty: row.orderQuantity, |
| | | // 䏻忮ç¼å· |
| | | upperOrderNo: this.row.upperOrderNo, |
| | | // å
³é®ï¼å½ååç»çæææç»IDéå |
| | | detailIds: row.originalDetails.map(detail => detail.id), |
| | | // 䏻忮ID |
| | | mainOrderId: this.row.id, |
| | | // 宿´åç»è¡ä¿¡æ¯ï¼å¤ç¨ï¼ |
| | | groupRow: row |
| | | }); |
| | | } else { |
| | | this.$refs.selectedStock.open(row); |
| | | ElMessage.warning("该åç»æ²¡ææç»æ°æ®ï¼æ æ³æå®åºå"); |
| | | } |
| | | }, |
| | | |
| | | handleViewDetail(row) { |
| | | // æ¥çåç»æç»ç详ç»ä¿¡æ¯ |
| | | if (row.originalDetails && row.originalDetails.length > 0) { |
| | | // è¿éå¯ä»¥æå¼ä¸ä¸ªæ°çå¼¹çªæ¾ç¤ºæææç»ï¼æè
使ç¨ç¬¬ä¸ä¸ªæç» |
| | | this.$refs.selectedStock.open(row.originalDetails[0]); |
| | | } |
| | | }, |
| | | |
| | | lockstocks() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); |
| | | |
| | | // è·åææéä¸åç»çåå§æç»ID |
| | | const detailIds = []; |
| | | this.selection.forEach(group => { |
| | | if (group.originalDetails && group.originalDetails.length > 0) { |
| | | group.originalDetails.forEach(detail => { |
| | | if (detail.id) { |
| | | detailIds.push(detail.id); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | if (detailIds.length === 0) { |
| | | return this.$message.error("æ²¡ææ¾å°å¯éå®çæç»"); |
| | | } |
| | | |
| | | this.http |
| | | .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | .post("api/OutboundOrderDetail/LockOutboundStocks", detailIds, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | handleOpenPicking() { |
| | | this.$router.push({ |
| | | 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 }, |
| | | }); |
| | | }, |
| | | |
| | | outbound() { |
| | | const savedStation = stationManager.getStation(); |
| | | console.log(savedStation); |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | |
| | | // è·åææéä¸åç»çåå§æç»ID |
| | | const detailIds = []; |
| | | this.selection.forEach(group => { |
| | | if (group.originalDetails && group.originalDetails.length > 0) { |
| | | group.originalDetails.forEach(detail => { |
| | | if (detail.id) { |
| | | detailIds.push(detail.id); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | if (detailIds.length === 0) { |
| | | return this.$message.error("æ²¡ææ¾å°å¯åºåºçæç»"); |
| | | } |
| | | |
| | | const platformOptions = [ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | |
| | | }, |
| | | }, [ |
| | | h(ElSelect, { |
| | | placeholder: "è¯·éæ©åºåºç«å°ï¼3-12ï¼", |
| | | placeholder: "è¯·éæ©åºåºç«å°", |
| | | modelValue: formData.selectedPlatform, |
| | | "onUpdate:modelValue": (val) => { |
| | | formData.selectedPlatform = val; |
| | |
| | | return; |
| | | } |
| | | |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | taskIds: keys, |
| | | taskIds: detailIds, |
| | | outboundPlatform: formData.selectedPlatform, |
| | | }; |
| | | |
| | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | }, |
| | | |
| | | outboundbatch() { |
| | | const savedStation = stationManager.getStation(); |
| | | console.log(savedStation); |
| | |
| | | if (this.selection.length > 1) { |
| | | return this.$message.error("åªè½éæ©ä¸æ¡åæ®æç»è¿è¡åæ¹åºåº"); |
| | | } |
| | | |
| | | const selectedGroup = this.selection[0]; |
| | | if (!selectedGroup.originalDetails || selectedGroup.originalDetails.length === 0) { |
| | | return this.$message.error("æ²¡ææ¾å°æç»æ°æ®"); |
| | | } |
| | | |
| | | // åæ¹åºåºé常é对å个æç» |
| | | // è¿é使ç¨ç¬¬ä¸ä¸ªæç» |
| | | const selectedDetail = selectedGroup.originalDetails[0]; |
| | | |
| | | const platformOptions = [ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | |
| | | }, |
| | | }, [ |
| | | h(ElSelect, { |
| | | placeholder: "è¯·éæ©åºåºç«å°ï¼3-12ï¼", |
| | | placeholder: "è¯·éæ©åºåºç«å°", |
| | | modelValue: formData.selectedPlatform, |
| | | "onUpdate:modelValue": (val) => { |
| | | formData.selectedPlatform = val; |
| | |
| | | step: "0.01", |
| | | precision: 2, |
| | | min: 0.01, |
| | | max: selectedDetail.orderQuantity - selectedDetail.overOutQuantity - selectedDetail.lockQuantity - selectedDetail.moveQty, |
| | | }), |
| | | ]), |
| | | h("div", { |
| | |
| | | return; |
| | | } |
| | | |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | orderDetailId: keys[0], |
| | | orderDetailId: selectedDetail.id, |
| | | outboundPlatform: formData.selectedPlatform, |
| | | batchQuantity: formData.outboundDecimal, |
| | | }; |
| | |
| | | } |
| | | ); |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | vnode.appContext = this.$appContext; |
| | | render(vnode, mountNode); |
| | | }, |
| | | |
| | | setCurrent(row) { |
| | | this.$refs.singleTable.setCurrentRow(row); |
| | | }, |
| | | |
| | | handleCurrentChange(val) { |
| | | this.currentRow = val; |
| | | }, |
| | | |
| | | getButtonEnable(propName, row) { |
| | | if (propName == "assignStock") { |
| | | if ( |
| | | row.orderDetailStatus !== 0 && |
| | | row.orderDetailStatus !== 60 && |
| | | row.orderDetailStatus !== 70 && |
| | | row.orderDetailStatus !== 80 |
| | | row.orderDetailStatus !== 70 |
| | | ) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | }, |
| | | |
| | | parentCall(fun) { |
| | | if (typeof fun != "function") { |
| | | return console.log("æ©å±ç»ä»¶éè¦ä¼ å
¥ä¸ä¸ªåè°æ¹æ³æè½è·åç¶çº§Vue对象"); |
| | | } |
| | | fun(this); |
| | | }, |
| | | |
| | | handleRowClick(row) { |
| | | this.$refs.singleTable.toggleRowSelection(row); |
| | | }, |
| | | |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | }, |
| | | |
| | | getDictionaryData() { |
| | | if (this.dictionaryList) { |
| | | return; |
| | | } |
| | | var param = []; |
| | | this.tableColumns.forEach((x) => { |
| | | if (x.type == "tag" && x.bindKey != "") { |
| | | param.push(x.bindKey); |
| | | } |
| | | }); |
| | | var param = ["orderDetailStatusEnum"]; |
| | | this.http |
| | | .post("api/Sys_Dictionary/GetVueDictionary", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | getDictionary(row, column) { |
| | | |
| | | getDictionaryForGroup(row) { |
| | | if (this.dictionaryList) { |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | var item = this.dictionaryList.find((x) => x.dicNo == "orderDetailStatusEnum"); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.prop]); |
| | | var dicItem = item.data.find((x) => x.key == row.orderDetailStatus); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } else { |
| | | return row[column.prop]; |
| | | return row.orderDetailStatus; |
| | | } |
| | | } else { |
| | | return row[column.prop]; |
| | | return row.orderDetailStatus; |
| | | } |
| | | } |
| | | return row[column.prop]; |
| | | return row.orderDetailStatus; |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "taskType", |
| | | // title: "ä»»å¡ç±»å", |
| | | // type: "int", |
| | | // width: 120, |
| | | // align: "left", |
| | | // bind: { key: "taskType", data: [] }, |
| | | // }, |
| | | { |
| | | field: "taskType", |
| | | title: "ä»»å¡ç±»å", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "taskType", data: [] }, |
| | | }, |
| | | { |
| | | field: "taskStatus", |
| | | title: "ä»»å¡ç¶æ", |
| | |
| | | { |
| | | resultDTO.UniqueUnit = ""; |
| | | } |
| | | var validDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>().Where(s => s.OrderNo == orderNo).ToList(); |
| | | resultDTO.StockSumQuantity = orderDetail.Details.Sum(d => d.OrderQuantity); |
| | | resultDTO.StockCount = orderDetail.Details.Count; |
| | | if (validDetails.Any()) |
| | | { |
| | | resultDTO.StockSumQuantity -= validDetails.Sum(d => d.StockQuantity); |
| | | // æç»è®°å½æ°ï¼ç¬¦åæ¡ä»¶çææè®°å½æ¡æ° |
| | | resultDTO.StockCount -= validDetails.Count; |
| | | } |
| | | var inbound =_inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == orderNo); |
| | | var inboundDetails = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.OrderId == inbound.First().Id).ToList(); |
| | | resultDTO.StockSumQuantity = inboundDetails.Where(x=>x.ReceiptQuantity==0).Sum(x=>x.OrderQuantity); |
| | | resultDTO.StockCount = inboundDetails.Where(x => x.ReceiptQuantity == 0).Count(); |
| | | //var validDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>().Where(s => s.OrderNo == orderNo).ToList(); |
| | | //resultDTO.StockSumQuantity = orderDetail.Details.Sum(d => d.OrderQuantity); |
| | | //resultDTO.StockCount = orderDetail.Details.Count; |
| | | //if (validDetails.Any()) |
| | | //{ |
| | | // resultDTO.StockSumQuantity -= validDetails.Sum(d => d.StockQuantity); |
| | | // // æç»è®°å½æ°ï¼ç¬¦åæ¡ä»¶çææè®°å½æ¡æ° |
| | | // resultDTO.StockCount -= validDetails.Count; |
| | | //} |
| | | return content.OK("", resultDTO); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | public string SupplyCode { get; set; } |
| | | |
| | | [SugarColumn(ColumnName = "lineNo", ColumnDescription = "è¡å·")] |
| | | public string? lineNo { get; set; } |
| | | public string lineNo { get; set; } |
| | | |
| | | public string WarehouseCode { get; set; } |
| | | /// <summary> |
| | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¶æ")] |
| | | public int Status { get; set; } |
| | | |
| | | [SugarColumn(Length = 100)] |
| | | [SugarColumn(Length = 100, ColumnDescription = "å½åæ¡ç ")] |
| | | public string CurrentBarcode { get; set; } // å½åæ¡ç ï¼æå
åå¯è½ååï¼ |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åå§é宿°é")] |
| | | public decimal OriginalLockQuantity { get; set; } // åå§é宿°é |
| | | public int IsSplitted { get; set; } // æ¯å¦å·²æå
0-å¦ 1-æ¯ |
| | | |
| | | [SugarColumn( ColumnDescription = "æå
ç¶éå®Id")] |
| | | public int? ParentLockId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½è
")] |
| | | public string Operator { get; set; } |
| | | |
| | | |
| | | [SugarColumn( ColumnDescription = "ç©ææ¡ç æ°é")] |
| | | public decimal BarcodeQty { get; set; } |
| | | |
| | | [SugarColumn(ColumnDescription = "ç©æåä½")] |
| | | public string BarcodeUnit { get; set; } |
| | | |
| | | [SugarColumn(ColumnDescription = "åæ¹åºåºæ¹æ¬¡å·")] |
| | | public string OutboundBatchNo { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToOne, nameof(StockInfo))]//ä¸å¯¹ä¸ SchoolIdæ¯StudentAç±»éé¢ç |
| | | public Dt_StockInfo StockInfo { get; set; } //ä¸è½èµå¼åªè½æ¯null |
| | | |
| | | [SugarColumn(ColumnDescription = "æ¯å¦åé
")] |
| | | public int IsUnallocated { get; set; } = 0; |
| | | |
| | | [SugarColumn(ColumnDescription = "ååº")] |
| | | public string FactoryArea { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å©ä½æ°é |
| | | /// </summary> |
| | | [SqlSugar.SugarColumn(IsIgnore = true)] |
| | | |
| | | public decimal RemainQuantity => AssignQuantity - PickedQty; |
| | | |
| | | |
| | | public int ReturnToMESStatus { get; set; } |
| | | |
| | | } |
| | |
| | | /// <summary> |
| | | /// æ£éè®°å½è¡¨ |
| | | /// </summary> |
| | | |
| | | [SugarTable(nameof(Dt_PickingRecord), "æ£éè®°å½è¡¨")] |
| | | |
| | | public class Dt_PickingRecord : BaseEntity |
| | | [SugarTable("Dt_PickingRecord")] |
| | | public class Dt_PickingRecord : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | /// <summary> |
| | | /// 主é®ID |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "")] |
| | | public int TaskNo { get; set; } |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¡ç |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ç©ææ¡ç ")] |
| | | public string Barcode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åºåºè¯¦æ
ID |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åºåºè¯¦æ
ID")] |
| | | public int OrderDetailId { get; set; } |
| | | |
| | | public string PalletCode { get; set; } |
| | | |
| | | public int OutStockLockId { get; set; } |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(Length = 100)] |
| | | public string Barcode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¬æ¬¡æ£éæ°é |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¬æ¬¡æ£éæ°é")] |
| | | public decimal PickQuantity { get; set; } |
| | | |
| | | public DateTime PickTime { get; set; } = DateTime.Now; |
| | | /// <summary> |
| | | /// æ£éæ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ£éæ¶é´")] |
| | | public DateTime PickTime { get; set; } |
| | | |
| | | [SugarColumn(Length = 50)] |
| | | public string Operator { get; set; } |
| | | |
| | | [SugarColumn(Length = 50)] |
| | | /// <summary> |
| | | /// æ£éåºä½ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ£éåºä½")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æçç¼å·")] |
| | | public int StockId { get; set; } |
| | | |
| | | public string BatchNo { get; set; } |
| | | /// <summary> |
| | | /// æä½ç±»åï¼0-æ£é 1-ååº |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æä½ç±»åï¼0-æ£é 1-ååº")] |
| | | public string Operator { get; set; } |
| | | |
| | | public bool IsCancelled { get; set; } |
| | | /// <summary> |
| | | /// 订åå· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "订åå·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | public DateTime? CancelTime { get; set; } |
| | | /// <summary> |
| | | /// æç®±å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æç®±å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | public string CancelOperator { get; set; } |
| | | /// <summary> |
| | | /// åºåºéå®ID |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åºåºéå®ID")] |
| | | public int? OutStockLockId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååº |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ååº")] |
| | | public string FactoryArea { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åº |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "warehouseCode", ColumnDescription = "ä»åº")] |
| | | public string? WarehouseCode { get; set; } |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "lineNo", ColumnDescription = "è¡å·")] |
| | | public string? lineNo { get; set; } |
| | | /// <summary> |
| | | /// ä¾åºåç¼å· |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "supplyCode", ColumnDescription = "ä¾åºåç¼å·")] |
| | | public string? SupplyCode { get; set; } |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ°é |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "barcodeQty", ColumnDescription = "æ°é")] |
| | | /// æ¯å¦åæ¶æ£é |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¯å¦åæ¶æ£é")] |
| | | public bool IsCancelled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ¶æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åæ¶æ¶é´")] |
| | | public DateTime? CancelTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ¶äºº |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åæ¶äºº")] |
| | | public string CancelOperator { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ä»åºç¼å·")] |
| | | public string WarehouseCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "è¡å·")] |
| | | public string lineNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¾åºåç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ä¾åºåç¼å·")] |
| | | public string SupplyCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ°é |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ç©ææ°é")] |
| | | public decimal BarcodeQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "barcodeUnit", ColumnDescription = "åä½")] |
| | | public string BarcodeUnit { get; set; } = null!; |
| | | /// ç©æåä½ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ç©æåä½")] |
| | | public string BarcodeUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "barcodemoveQty", ColumnDescription = "æ°é")] |
| | | /// ç©ææªææ°é |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ç©ææªææ°é")] |
| | | public decimal BarcodeMoveQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åä¼ MES")] |
| | | public int ReturnToMESStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä¼ MESå¯ä¸å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åä¼ MESå¯ä¸å·")] |
| | | public string FeedBackMesDocumentNo { get; set; } |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ååºè®°å½è¡¨ |
| | |
| | | /// <summary> |
| | | /// æå
è®°å½è¡¨ |
| | | /// </summary> |
| | | [SugarTable("Dt_SplitPackageRecord")] |
| | | [SugarTable("Dt_SplitPackageRecord")] // æ¾å¼æå®è¡¨åï¼ä¸æ°æ®åºä¸è´ |
| | | public class Dt_SplitPackageRecord : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | public int Id { get; set; } |
| | | public string OrderNo { get; set; } |
| | | public int? TaskNum { get; set; } |
| | | public string PalletCode { get; set; } |
| | | public int StockId { get; set; } |
| | | public bool IsReverted { get; set; } = false; |
| | | /// <summary> |
| | | /// 主é®ID |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "")] |
| | | public long Id { get; set; } |
| | | |
| | | public bool IsAutoSplit { get; set; } = false; |
| | | public int OutStockLockInfoId { get; set; } // å
³èçåºåºéå®ä¿¡æ¯ |
| | | public string OriginalBarcode { get; set; } // åæ¡ç |
| | | public string NewBarcode { get; set; } // æ°æ¡ç |
| | | /// <summary> |
| | | /// åæ¡ç |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åæ¡ç ")] |
| | | public string OriginalBarcode { get; set; } |
| | | |
| | | public string FactoryArea { get; set; } |
| | | /// <summary> |
| | | /// æ°æ¡ç |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ°æ¡ç ")] |
| | | public string NewBarcode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ°é |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åæ°é")] |
| | | public decimal OriginalQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåæ°éï¼æ°æ¡ç æ°éï¼ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æåæ°éï¼æ°æ¡ç æ°éï¼")] |
| | | public decimal SplitQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºä½ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åºä½ç¼å·")] |
| | | public string LocationId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå
æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æå
æ¶é´")] |
| | | public DateTime SplitTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¶æï¼0-å·²æå 1-æ°æ¡ç å·²åä¼ MES |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ç¶æï¼0-å·²æå 1-æ°æ¡ç å·²åä¼ MES")] |
| | | public int Status { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ä»»å¡å·")] |
| | | public int? TaskNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å©ä½æ°éï¼åæ¡ç å©ä½ï¼ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "å©ä½æ°éï¼åæ¡ç å©ä½ï¼")] |
| | | public decimal RemainQuantity { get; set; } |
| | | |
| | | public string MaterielCode { get; set; } // ç©æç¼ç |
| | | public DateTime SplitTime { get; set; } = DateTime.Now; |
| | | public string Operator { get; set; } // æä½äºº |
| | | public int Status { get; set; } // ç¶æï¼1-å·²æå
2-å·²æ£é 3-å·²ååº |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | public DateTime RevertTime { get; set; } |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æçç¼å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | public string RevertOperator { get; set; } |
| | | /// <summary> |
| | | /// æ¤éæå
|
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¤éæå
")] |
| | | public bool IsReverted { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éå®è®°å½Id |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "éå®è®°å½Id")] |
| | | public int OutStockLockInfoId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½äºº |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æä½äºº")] |
| | | public string Operator { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åå·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåid |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åºåid")] |
| | | public int StockId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååº |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "ååº")] |
| | | public string FactoryArea { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¤éæ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¤éæ¶é´")] |
| | | public DateTime? RevertTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¸æ¡æåè®°å½ID |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "")] |
| | | public int PreviousSplitRecordId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true)] |
| | | public decimal? OriginalStockQuantity { get; set; } |
| | | /// <summary> |
| | | /// åºåæ° |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "åºåæ°")] |
| | | public decimal OriginalStockQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå
åçåºåæ°é |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æå
åçåºåæ°é")] |
| | | public decimal StockBeforeSplit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå
ååé
æ° |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æå
ååé
æ°")] |
| | | public decimal AssignBeforeSplit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¤éæä½äºº |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "")] |
| | | public string RevertOperator { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦èªå¨æå
|
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¯å¦èªå¨æå
")] |
| | | public bool IsAutoSplit { get; set; } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 空箱åèµ°è®°å½è¡¨ |
| | | /// </summary> |
| | |
| | | using SqlSugar; |
| | | using WIDESEA_Common.StockEnum; |
| | | using System.Collections.Generic; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.HttpContextUser; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | |
| | | public PageGridData<StockInfoDetailWithPalletDto> GetPageData2(PageDataOptions options) |
| | | { |
| | | |
| | | string wheres = ValidatePageOptions(options); |
| | | |
| | | var sugarQueryable = Db.Queryable<Dt_StockInfoDetail>().InnerJoin<Dt_StockInfo>((detail, item) => detail.StockId == item.Id); |
| | | var sugarQueryable = Db.Queryable<Dt_StockInfoDetail>().InnerJoin<Dt_StockInfo>((detail, item) => detail.StockId == item.Id) |
| | | .Where((detail, item) => item.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt()); |
| | | |
| | | Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties); |
| | | List<OrderByModel> orderByModels = new List<OrderByModel>(); |
| | |
| | | { |
| | | OrderByModel orderByModel = new() |
| | | { |
| | | FieldName = "detail."+item.Key, |
| | | FieldName = "detail." + item.Key, |
| | | OrderByType = item.Value |
| | | }; |
| | | orderByModels.Add(orderByModel); |
| | | } |
| | | else |
| | | { |
| | |
| | | FieldName = item.Key, |
| | | OrderByType = item.Value |
| | | }; |
| | | orderByModels.Add(orderByModel); |
| | | } |
| | | //orderByModels.Add(orderByModel); |
| | | |
| | | } |
| | | int totalCount = 0; |
| | | List<SearchParameters> searchParametersList = new List<SearchParameters>(); |
| | |
| | | { |
| | | foreach (var param in searchParametersList) |
| | | { |
| | | // å¹é
æçç¼å·æ¥è¯¢æ¡ä»¶ï¼å°ååæ®µåï¼ |
| | | if (param.Name.Equals(nameof(Dt_StockInfo.PalletCode).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase) |
| | | && !string.IsNullOrEmpty(param.Value?.ToString())) |
| | | { |
| | |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | |
| | | } |
| | | var data = sugarQueryable |
| | | .WhereIF(!wheres.IsNullOrEmpty(), wheres) |
| | | .OrderBy(orderByModels) |
| | |
| | | |
| | | [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> Test() |
| | | { |
| | | { |
| | | |
| | | //var seq = await _dailySequenceService.GetNextSequenceAsync(); |
| | | //var SDDD= "WSLOT" + DateTime.Now.ToString("yyyyMMdd") + seq.ToString()?.PadLeft(5, '0'); |
| | | |
| | | //var originalTask = _taskRepository.Db.Queryable<Dt_Task>().First(); |
| | | |
| | | //var result = _task_HtyService.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.人工å é¤); |
| | |
| | | //var ddddssss = "WSLOT" + DateTime.Now.ToString("yyyyMMddHHmmss") + ssss.ToString().PadLeft(5, '0'); |
| | | //erpApiService.GetSuppliersAsync(); |
| | | |
| | | // erpApiService.GetMaterialUnitAsync(); |
| | | // erpApiService.GetMaterialUnitAsync(); |
| | | |
| | | //var sss = await _invokeMESService.NewMaterielToMes(new WIDESEA_DTO.Basic.MaterielToMesDTO |
| | | //{ |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <DeleteExistingFiles>false</DeleteExistingFiles> |
| | | <DeleteExistingFiles>true</DeleteExistingFiles> |
| | | <ExcludeApp_Data>false</ExcludeApp_Data> |
| | | <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> |
| | | <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> |
| | | <LastUsedPlatform>Any CPU</LastUsedPlatform> |
| | | <PublishProvider>FileSystem</PublishProvider> |
| | | <PublishUrl>E:\IISText\HuanAn\WMS</PublishUrl> |
| | | <PublishUrl>D:\ALD</PublishUrl> |
| | | <WebPublishMethod>FileSystem</WebPublishMethod> |
| | | <_TargetId>Folder</_TargetId> |
| | | <SiteUrlToLaunchAfterPublish /> |