| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showDetialBox" |
| | | :lazy="true" |
| | | width="60%" |
| | | :padding="15" |
| | | title="æå®åºå" |
| | | > |
| | | <div class="box-head"> |
| | | <el-alert :closable="false" style="width: 100%"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <span class="less-style">ç©æåç§°ï¼ {{ row.materielName }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span class="less-style">ç©æç¼å·ï¼ {{ row.materielCode }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span class="less-style">éæ±æ°éï¼ {{ row.qty }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span :class="selectionClass">已鿰éï¼ {{ selectionSum }} </span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="getData" |
| | | >å·æ°</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="openOutboundDialog" |
| | | >ç´æ¥åºåº</el-link |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </el-alert> |
| | | </div> |
| | | <div class="box-table" style="margin-top: 1%"> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="tableData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | @row-click="handleRowClick" |
| | | height="500px" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | fixed="left" |
| | | width="55" |
| | | 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" |
| | | align="center" |
| | | > |
| | | <template #default="scoped" v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-button |
| | | type="text" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-button |
| | | ></el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <template #footer> |
| | | <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 { ElMessage } from "element-plus"; |
| | | |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | | return { |
| | | row: null, |
| | | showDetialBox: false, |
| | | tableData: [], |
| | | tableColumns: [ |
| | | { 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, |
| | | selectionClass: "less-style", |
| | | originalQuantity: 0, |
| | | |
| | | // åºåºå¼¹çªç¸å
³æ°æ® |
| | | showOutboundDialog: false, |
| | | outboundForm: { selectedPlatform: "" }, // 表åç»å®æ°æ® |
| | | outboundRules: { |
| | | selectedPlatform: [ |
| | | { required: true, message: "è¯·éæ©åºåºç«å°", trigger: "change" }, |
| | | ], |
| | | }, |
| | | platformOptions: [ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | | ], |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | this.getData(); |
| | | console.log(row.id) |
| | | this.updateSelectionClass(); // åå§åå·²éæ°éæ ·å¼ |
| | | }, |
| | | |
| | | lockStock() { |
| | | this.http |
| | | .post( |
| | | "api/OutboundOrderDetail/LockOutboundStock?id=" + this.row.id, |
| | | this.selection, |
| | | "æ°æ®å¤çä¸" |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | ElMessage.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // æå¼åºåºå¼¹çª |
| | | openOutboundDialog() { |
| | | if (this.selection.length === 0) { |
| | | return ElMessage.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | // é置表åé¿å
æ®çå¼ |
| | | this.outboundForm.selectedPlatform = ""; |
| | | this.showOutboundDialog = true; |
| | | }, |
| | | |
| | | // 确认åºåºæä½ |
| | | confirmOutbound() { |
| | | 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, 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() { |
| | | const url = "api/StockInfo/GetStockSelectViews?materielCode="; |
| | | this.http |
| | | .post( |
| | | url + this.row.materielCode + "&orderId=" + this.row.id, |
| | | null, |
| | | "æ¥è¯¢ä¸" |
| | | ) |
| | | .then((x) => { |
| | | this.tableData = x; |
| | | // å·æ°åæ¸
空ä¹åçéæ©åè®¡æ° |
| | | this.clearSelection(); |
| | | this.selectionSum = 0; |
| | | this.originalQuantity = 0; |
| | | this.updateSelectionClass(); |
| | | }); |
| | | }, |
| | | |
| | | revokeAssign() { |
| | | this.http |
| | | .post( |
| | | "api/OutboundOrderDetail/RevokeLockOutboundStock?id=" + this.row.id, |
| | | null, |
| | | "æ°æ®å¤çä¸" |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | ElMessage.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | // 计ç®å·²éæ°éï¼è½¬æ°åé¿å
åç¬¦ä¸²æ¼æ¥ï¼ |
| | | 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.orderQuantity) { |
| | | this.selectionClass = "equle-style"; |
| | | } else if (this.selectionSum < this.row.orderQuantity) { |
| | | this.selectionClass = "less-style"; |
| | | } else { |
| | | this.selectionClass = "more-style"; |
| | | } |
| | | }, |
| | | |
| | | toggleSelection(rows) { |
| | | rows ? rows.forEach((row) => this.$refs.singleTable.toggleRowSelection(row)) : this.clearSelection(); |
| | | }, |
| | | |
| | | clearSelection() { |
| | | if (this.$refs.singleTable) { |
| | | this.$refs.singleTable.clearSelection(); |
| | | } |
| | | }, |
| | | |
| | | handleRowClick(row) { |
| | | this.$refs.singleTable.toggleRowSelection(row); |
| | | }, |
| | | |
| | | // 徿 æé®ç¹å»å 使¹æ³ï¼å¯æ ¹æ®éæ±æ©å±ï¼ |
| | | tableButtonClick(row, item) { |
| | | console.log("徿 æé®ç¹å»ï¼", item.title, row); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .less-style { |
| | | color: black; |
| | | } |
| | | |
| | | .equle-style { |
| | | color: green; |
| | | } |
| | | |
| | | .more-style { |
| | | color: red; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .text-button:hover { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | |
| | | .el-table .warning-row { |
| | | background: oldlace; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | |
| | | .el-table .success-row { |
| | | background: #f0f9eb; |
| | | } |
| | | |
| | | .box-table .el-table { |
| | | border: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .box-head .el-alert__content { |
| | | width: 100%; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /***************************************************************************************** |
| | | ** Author:jxx 2022 |
| | | ** QQ:283591387 |
| | | **宿´ææ¡£è§ï¼http://v2.volcore.xyz/document/api ã代ç çæé¡µé¢ViewGridã |
| | | **常ç¨ç¤ºä¾è§ï¼http://v2.volcore.xyz/document/vueDev |
| | | **åå°æä½è§ï¼http://v2.volcore.xyz/document/netCoreDev |
| | | *****************************************************************************************/ |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/StockSelect.vue' |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { //æ¡æ¶åå§åé
ç½®åï¼ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æå®åºå</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | const table = this.$refs.table.$refs.table; |
| | | if (table) { |
| | | table.clearSelection(); |
| | | table.toggleRowSelection(row, true); |
| | | } |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | title: "æå®åºå", |
| | | type: "icon", |
| | | width: 90, |
| | | hidden:true, |
| | | icon: "el-icon-s-grid", |
| | | }, |
| | | { |
| | |
| | | path: '/allocateOrder', |
| | | name: 'Dt_AllocateOrder', |
| | | component: () => import('@/views/inbound/Dt_AllocateOrder.vue') |
| | | }, |
| | | { |
| | | path: '/reCheckOrder', |
| | | name: 'Dt_ReCheckOrder', |
| | | component: () => import('@/views/check/ReCheckOrder.vue') |
| | | } |
| | | ] |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *Authorï¼jxx |
| | | *Contactï¼283591387@qq.com |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *ä¸å¡è¯·å¨@/extension/widesea_wcs/order/Dt_CheckOrder.jsæ¤å¤ç¼å |
| | | --> |
| | | <template> |
| | | <view-grid ref="grid" :columns="columns" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/check/recheckOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'id', |
| | | footer: "Foots", |
| | | cnName: '鿣å', |
| | | name: 'Dt_ReCheckOrder', |
| | | url: "/ReCheckOrder/", |
| | | sortName: "id" |
| | | }); |
| | | |
| | | |
| | | const editFormFields = ref({ |
| | | OrderNo: "", |
| | | MaterielCode: "", |
| | | BatchNo: "", |
| | | WarehouseCode: "", |
| | | Unit: "", |
| | | FactoryArea: "", |
| | | Result: 0, |
| | | InspectionNumber: 0, |
| | | Qty: 0, |
| | | SignSeq: 0 |
| | | }); |
| | | |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { title: "夿£åå·", field: "OrderNo", type: "input", require: true }, |
| | | { title: "ç©æç¼å·", field: "MaterielCode", type: "input", require: true }, |
| | | { title: "æ¹æ¬¡å·", field: "BatchNo", type: "input", require: true }, |
| | | { title: "ä»åºç¼ç ", field: "WarehouseCode", type: "input", require: true } |
| | | ], |
| | | [ |
| | | { title: "åä½", field: "Unit", type: "input", require: true }, |
| | | { title: "ååº", field: "FactoryArea", type: "input", require: true }, |
| | | { title: "æ£éªç»æ", field: "Result", type: "select", require: true,dataKey: "inOrderType",data: []}, |
| | | { title: "æ£éªæ¬¡æ°", field: "InspectionNumber", type: "number", require: true, min: 1 } |
| | | ], |
| | | [ |
| | | { title: "æ°é", field: "Qty", type: "number", require: true, min: 0 }, |
| | | { title: "ç¾å顺åº", field: "SignSeq", type: "number", require: true, min: 1 } |
| | | ] |
| | | ]); |
| | | |
| | | |
| | | const searchFormFields = ref({ |
| | | OrderNo: "", |
| | | MaterielCode: "", |
| | | BatchNo: "", |
| | | WarehouseCode: "", |
| | | FactoryArea: "", |
| | | Result: "" |
| | | }); |
| | | |
| | | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "夿£åå·", field: "OrderNo", type: "like" }, |
| | | { title: "ç©æç¼å·", field: "MaterielCode", type: "like" }, |
| | | { title: "æ¹æ¬¡å·", field: "BatchNo", type: "like" }, |
| | | { title: "ä»åºç¼ç ", field: "WarehouseCode", type: "like" } |
| | | ], |
| | | [ |
| | | { title: "ååº", field: "FactoryArea", type: "like" }, |
| | | { title: "æ£éªç»æ", field: "Result", type: "select",dataKey: "inOrderType", data: []} |
| | | ] |
| | | ]); |
| | | |
| | | |
| | | const columns = ref([ |
| | | { field: 'id', title: '主é®', type: 'int', width: 150, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'orderNo', title: '夿£åå·', type: 'string', width: 160, require: true, align: 'left', sort: true }, |
| | | { field: 'materielCode', title: 'ç©æç¼å·', type: 'string', width: 160, require: true, align: 'left' }, |
| | | { field: 'batchNo', title: 'æ¹æ¬¡å·', type: 'string', width: 160, require: true, align: 'left' }, |
| | | { field: 'warehouseCode', title: 'ä»åºç¼ç ', type: 'string', width: 160, require: true, align: 'left' }, |
| | | { field: 'unit', title: 'åä½', type: 'string', width: 100, require: true, align: 'left' }, |
| | | { field: 'factoryArea', title: 'ååº', type: 'string', width: 120, require: true, align: 'left' }, |
| | | { field: 'result', title: 'æ£éªç»æ', type: 'int', width: 110, require: true, align: 'left',bind: { key: "inOrderType", data: [] },}, |
| | | { field: 'inspectionNumber', title: 'æ£éªæ¬¡æ°', type: 'int', width: 110, require: true, align: 'left' }, |
| | | { field: 'qty', title: 'æ°é', type: 'float', width: 110, require: true, align: 'left' }, |
| | | { field: 'signSeq', title: 'ç¾å顺åº', type: 'int', width: 110, require: true, align: 'left' }, |
| | | { field: 'creater', title: 'å建è
', type: 'string', width: 110, require: true, align: 'left' }, |
| | | { field: 'createDate', title: 'å建æ¶é´', type: 'datetime', width: 150, require: true, align: 'left', sort: true }, |
| | | { field: 'modifier', title: 'ä¿®æ¹äºº', type: 'string', width: 100, align: 'left' }, |
| | | { field: 'modifyDate', title: 'ä¿®æ¹æ¥æ', type: 'datetime', width: 150, align: 'left', sort: true }, |
| | | ]); |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | *ä¸å¡è¯·å¨@/extension/widesea_wcs/order/Dt_CheckOrder.jsæ¤å¤ç¼å |
| | | --> |
| | | <template> |
| | | <view-grid ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend"> |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | |
| | | |
| | | if (!stockInfos.Any()) |
| | | { |
| | | throw new Exception($"ç©æ[{item.MaterielCode}]æ¹æ¬¡[{item.BatchNo}]æªæ¾å°å¯åé
åºå"); |
| | | throw new Exception($"ç©æ[{item.MaterielCode}]æ¹æ¬¡[{item.BatchNo}]ä¾åºå[{item.SupplyCode}]æªæ¾å°å¯åé
åºå"); |
| | | } |
| | | |
| | | // åé
åºåï¼æå
è¿å
åºï¼ |
| | |
| | | if (currentLockInfo.PickedQty < context.PickingRecord.PickQuantity) |
| | | return ValidationResult<bool>.Error($"éå®ä¿¡æ¯å·²æ£éæ°é({currentLockInfo.PickedQty})å°äºåæ¶æ°é({context.PickingRecord.PickQuantity})"); |
| | | |
| | | // éªè¯åºåæ°æ® |
| | | var currentStockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | .FirstAsync(x => x.Barcode == context.PickingRecord.Barcode && x.StockId == context.PickingRecord.StockId); |
| | | ////// éªè¯åºåæ°æ® |
| | | ////var currentStockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | //// .FirstAsync(x => x.Barcode == context.PickingRecord.Barcode && x.StockId == context.PickingRecord.StockId); |
| | | |
| | | if (currentStockDetail == null) |
| | | return ValidationResult<bool>.Error($"æªæ¾å°å¯¹åºçåºåæç»è®°å½"); |
| | | ////if (currentStockDetail == null) |
| | | //// return ValidationResult<bool>.Error($"æªæ¾å°å¯¹åºçåºåæç»è®°å½"); |
| | | |
| | | if (currentStockDetail.Status == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt() || |
| | | currentStockDetail.Status == StockStatusEmun.å
¥åºå®æ.ObjToInt()) |
| | | return ValidationResult<bool>.Error($"æ¡ç {context.PickingRecord.Barcode}å·²ç»ååºï¼æ æ³åæ¶åæ£"); |
| | | ////if (currentStockDetail.Status == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt() || |
| | | //// currentStockDetail.Status == StockStatusEmun.å
¥åºå®æ.ObjToInt()) |
| | | //// return ValidationResult<bool>.Error($"æ¡ç {context.PickingRecord.Barcode}å·²ç»ååºï¼æ æ³åæ¶åæ£"); |
| | | |
| | | // éªè¯ç¶ææµè½¬çåæ³æ§ |
| | | if (!await CanCancelPicking(currentLockInfo, currentStockDetail)) |
| | | if (!await CanCancelPicking(currentLockInfo, null)) |
| | | return ValidationResult<bool>.Error($"å½åç¶æä¸å
è®¸åæ¶åæ£"); |
| | | |
| | | return ValidationResult<bool>.Success(true); |
| | |
| | | if (lockInfo.Status != (int)OutLockStockStatusEnum.æ£é宿) |
| | | return false; |
| | | |
| | | // åºåç¶ææ£æ¥ |
| | | if (stockDetail.Status == StockStatusEmun.åºåºå®æ.ObjToInt()) |
| | | return false; |
| | | ////// åºåç¶ææ£æ¥ |
| | | ////if (stockDetail.Status == StockStatusEmun.åºåºå®æ.ObjToInt()) |
| | | //// return false; |
| | | |
| | | // å¦ææ¯æå
è®°å½ï¼è¿éè¦æ£æ¥ç¶éå®ä¿¡æ¯ç¶æ |
| | | if (lockInfo.IsSplitted == 1 && lockInfo.ParentLockId.HasValue) |
| | |
| | | var stocks = stockQuery.ToList() |
| | | .Where(x => x.Details.Any(d => |
| | | d.MaterielCode == materielCode && |
| | | d.BatchNo == orderDetail.BatchNo && |
| | | d.SupplyCode == orderDetail.SupplyCode && |
| | | string.IsNullOrEmpty(orderDetail.BatchNo)?true: d.BatchNo == orderDetail.BatchNo&& |
| | | string.IsNullOrEmpty(orderDetail.BatchNo)?true:d.SupplyCode == orderDetail.SupplyCode && |
| | | d.StockQuantity > d.OutboundQuantity |
| | | )) |
| | | .OrderBy(x => x.CreateDate) |
| | |
| | | { |
| | | var relevantDetails = stock.Details |
| | | .Where(d => d.MaterielCode == materielCode && |
| | | d.BatchNo == orderDetail.BatchNo && |
| | | d.SupplyCode == orderDetail.SupplyCode && |
| | | string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.BatchNo == orderDetail.BatchNo && |
| | | string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.SupplyCode == orderDetail.SupplyCode && |
| | | d.StockQuantity > d.OutboundQuantity) |
| | | .ToList(); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_ICheckService; |
| | | using WIDESEA_Model.Models.Check; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Check |
| | | { |
| | | /// <summary> |
| | | /// 鿣å |
| | | /// </summary> |
| | | [Route("api/ReCheckOrder")] |
| | | [ApiController] |
| | | public class ReCheckOrderController : ApiBaseController<IReCheckOrderService, Dt_ReCheckOrder> |
| | | { |
| | | public ReCheckOrderController(IReCheckOrderService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |