From 89d75ee7b52a78c26c4eafc2dcb00ffd39daa596 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 13 十二月 2023 16:38:17 +0800 Subject: [PATCH] 出库、入库、调拨、报废新建的时候增加对应单号及编码规范 --- src/views/operate/scrap/AddScrapDialog.vue | 44 ++++++++++++++++++++++++++++++++++++-------- 1 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/views/operate/scrap/AddScrapDialog.vue b/src/views/operate/scrap/AddScrapDialog.vue index 73911a4..3393fb9 100644 --- a/src/views/operate/scrap/AddScrapDialog.vue +++ b/src/views/operate/scrap/AddScrapDialog.vue @@ -44,6 +44,25 @@ <div class="basic-info-view"> <el-row> <el-col :span="12"> + <el-form-item label="鎶ュ簾鍗曞彿" prop="number"> + <el-input + style="width: 85%" + v-if=" + editConfig.title == '缂栬緫' || + editConfig.title == '鏌ョ湅' || + (editConfig.title == '鏂板缓' && codenumer && (explain != '' || isIdDisabled)) + " + :disabled="editConfig.title != '鏂板缓'" + v-model="editConfig.infomation.number" + placeholder="璇疯緭鍏ョ紪鐮�" + > + </el-input> + <span v-else-if="editConfig.title == '鏂板缓'" style="color: #f56c6c; width: 85%" + >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span + > + </el-form-item> + </el-col> + <el-col :span="12"> <el-form-item label="浜у搧" prop="productName"> <SimpleSearchInput :echoValue="editConfig.infomation.productName" @@ -127,8 +146,10 @@ import { getLocationList } from "@/api/overview/overview" import { addDisuse, finishDisuse, updateScrap } from "@/api/operate/scrap" import SimpleSearchInput from "@/components/makepager/SimpleSearchInput" +import codeMixin from "@/views/overview/mixin/codeMixin" export default { name: "AddScrapDialog", + mixins: [codeMixin], props: { editCommonConfig: { type: Object, @@ -176,8 +197,17 @@ this.getProductList() this.getLocationList() this.unit = this.editConfig.infomation.unit || "" + this.formInfo() }, methods: { + formInfo() { + this.objCode.type = "浠撳簱鎶ュ簾缂栫爜" + this.objCode.codeStandID = "" + if (this.editConfig.infomation.codeStandardID) { + this.objCode.codeStandID = this.editConfig.infomation.codeStandardID + } + this.getRCodeStandardList() + }, // 浜у搧 async getProductList() { await getProductList({ @@ -195,7 +225,7 @@ // 鑾峰彇浠撳簱浣嶇疆鍒楄〃 async getLocationList() { await getLocationList({ - keyWord: "", + isScrapLocation: true, page: 0, pageSize: 0 }).then((res) => { @@ -267,12 +297,9 @@ } else if (this.editCommonConfig.title === "缂栬緫") { this.$refs[formName].validate((valid) => { if (valid) { - this.editConfig.infomation.productId = this.productId - this.editConfig.infomation.productName = this.productName - this.editConfig.infomation.unit = this.unit - updateScrap({ - amount: this.editConfig.infomation.amount, //鏁伴噺 - baseOperationType: 1, + let params = { + amount: this.editConfig.infomation.amount, + baseOperationType: this.editConfig.infomation.baseOperationType, fromLocationId: this.editConfig.infomation.fromLocationId, id: this.editConfig.infomation.id, number: this.editConfig.infomation.number, @@ -281,7 +308,8 @@ sourceNumber: this.editConfig.infomation.sourceNumber, status: this.editConfig.infomation.status, toLocationId: this.editConfig.infomation.toLocationId - }).then((res) => { + } + updateScrap(params).then((res) => { console.log(res) this.editConfig.visible = false if (res.code === 200) { -- Gitblit v1.8.0