From 3c4e059b2c47e3ba22b694805645b008c4276e25 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期一, 05 二月 2024 19:11:30 +0800 Subject: [PATCH] 添加修改密码,api拦截,bug修改 --- src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue | 4 src/components/layout/components/appHeader/index.vue | 33 ++ src/components/layout/components/appHeader/components/updatePassWord.vue | 182 +++++++++++++ src/views/operate/outEnterLibrary/index.vue | 7 src/views/productManage/product/AddProductDialog.vue | 82 +++++ src/views/operate/allot/index.vue | 18 + src/views/operate/scrap/AddScrapDialog.vue | 41 ++ src/views/overview/AddOverviewDialog.vue | 3 src/common/untils/request.js | 11 src/views/reportForm/inboundOutboundDetail/index.vue | 10 src/api/admin/user.js | 20 + src/views/productManage/product/components/bomDialog.vue | 360 +++++++++++++++++++++++++ src/api/basic/standard.js | 32 ++ 13 files changed, 776 insertions(+), 27 deletions(-) diff --git a/src/api/admin/user.js b/src/api/admin/user.js new file mode 100644 index 0000000..c676610 --- /dev/null +++ b/src/api/admin/user.js @@ -0,0 +1,20 @@ +import request from "@/common/untils/request" + +// 閲嶇疆瀵嗙爜 +export function initPassword(data) { + return request({ + url: "/api/user/initPassword", + method: "post", + data, + }); +} +// 璁剧疆鏂板瘑鐮� +export function modifiedPwd(data) { + return request({ + url: "/api/user/modifiedPwd", + method: "post", + data, + }); +} + + diff --git a/src/api/basic/standard.js b/src/api/basic/standard.js new file mode 100644 index 0000000..fbc9a1b --- /dev/null +++ b/src/api/basic/standard.js @@ -0,0 +1,32 @@ +import request from "@/common/untils/request" + +//缂栫爜瑙勮寖鍒楄〃 +export const getCodeStandardList = (data) => { + return request({ + url: "/api-s/v1/standard/getCodeStandardList", + method: "post", + data, + }); +}; + + +export const addMaterial = (data) => { + return request({ + url: "/api-s/v1/material/addMaterial", + method: "post", + data, + }); +}; + + +export const updateMaterial = (data) => { + return request({ + url: "/api-s/v1/material/updateMaterial", + method: "post", + data, + }); +}; + +// ----bom --- 瑷堥噺鍠綅 鐨勬暩鎿� 鏇存柊 +export const postGetSaveSUnitDict = (params) => + request.post("/api-s/v1/dict/saveUnitDict", params); \ No newline at end of file diff --git a/src/common/untils/request.js b/src/common/untils/request.js index 6bef5a9..e4bf487 100644 --- a/src/common/untils/request.js +++ b/src/common/untils/request.js @@ -73,6 +73,17 @@ window.location = getApsPage()+'/login' } return Promise.reject(res.data) + }else if([2036].includes(res.data.code)){ + if (isDev){ + window.location = getApsPage()+'/commonWeb?resetPwd=true' + }else { + // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉 + window.location = getApsPage()+'/commonWeb' + } + return Promise.reject(res.data) + // if(window.location.pathname && window.location.pathname !== '/login'){ + // window.location = window.location.origin+'/login' + // } } else { Message({ message: res.data.msg, diff --git a/src/components/layout/components/appHeader/components/updatePassWord.vue b/src/components/layout/components/appHeader/components/updatePassWord.vue new file mode 100644 index 0000000..8d089bf --- /dev/null +++ b/src/components/layout/components/appHeader/components/updatePassWord.vue @@ -0,0 +1,182 @@ +<template> + <div> + <el-dialog + title="淇敼瀵嗙爜" + :visible.sync="editConfig.dialogVisible" + width="30%" + :before-close="handleClose"> + <el-form :label-position="labelPosition" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> + <el-form-item label="鏃у瘑鐮�:" prop="oldPass"> + <el-input type="password" clearable v-model="ruleForm.oldPass" autocomplete="off"></el-input> + </el-form-item> + <el-form-item label="鏂板瘑鐮�:" prop="pass"> + <el-input type="password" clearable v-model="ruleForm.pass" autocomplete="off"></el-input> + </el-form-item> + <el-form-item label="纭瀵嗙爜:" prop="checkPass"> + <el-input type="password" clearable v-model="ruleForm.checkPass" autocomplete="off"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="submitForm('ruleForm')" style="margin-bottom:20px;">纭</el-button> + </el-form-item> + </el-form> + </el-dialog> + </div> +</template> + +<script> +import { modifiedPwd } from "@/api/admin/user"; +export default { + props: { + editCommonConfig: { + type: Object, + default: () => { + return { + dialogVisible:false, + userId:"", + }; + }, + }, + }, + data() { + var validatePass = (rule, value, callback) => { + if (value === '') { + callback(new Error('璇疯緭鍏ユ棫瀵嗙爜')); + }else{ + callback(); + } + }; + var validatePass1 = (rule, value, callback) => { + if (value === '') { + callback(new Error('璇疯緭鍏ユ柊瀵嗙爜')); + } else { + if (this.ruleForm.checkPass !== '') { + this.$refs.ruleForm.validateField('checkPass'); + } + callback(); + } + }; + var validatePass2 = (rule, value, callback) => { + if (value === '') { + callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); + } else if (value !== this.ruleForm.pass) { + callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); + } else { + callback(); + } + }; + return { + editConfig:this.editCommonConfig, + // dialogVisible: false + ruleForm: { + oldPass:'', + pass: '', + checkPass: '', + }, + rules: { + oldPass: [ + { validator: validatePass, trigger: 'blur', required: true, } + ], + pass: [ + { validator: validatePass1, trigger: 'blur', required: true, } + ], + checkPass: [ + { validator: validatePass2, trigger: 'blur', required: true, } + ], + }, + labelPosition:"left", + userId : '', + }; + }, + computed: { + + }, + created() { + + }, + mounted() { + }, + watch: { + + }, + methods: { + // + environmentType(){ + let type + if (location.href.includes('192.168.20.119')) { + type = 'test' + } else if (location.href.includes('192.168') || location.href.includes('localhost')) { + type = 'dev' + } else { + type = 'prod' + } + return type + }, + // + getApsPage(){ + // 棣栭〉閮ㄧ讲鍦ㄥ悇涓幆澧冪殑绔彛 + const loginPathMap = { + prod:`//${window.location.hostname}:9080`, + test:`//192.168.20.119:9080`, + // 鎯宠烦鍒版湰鍦板惎鍔ㄧ殑鐧诲綍椤电殑璇濋渶瑕佹妸dev鏀规垚浣犳湰鍦伴」鐩矾寰� + dev: `//192.168.8.108:8080` + } + + return loginPathMap[this.environmentType()] + }, + handleClose(done){ + done(); + }, + modifiedPwd(params){ + modifiedPwd(params).then((res)=>{ + if(res.code==200){ + this.editConfig.dialogVisible=false + alert("瀵嗙爜淇敼鎴愬姛,璇烽噸鏂扮櫥褰�!") + window.location = this.getApsPage()+'/login' + } + }) + }, + submitForm(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + console.log(this.ruleForm,"鐪嬬湅琛ㄥ崟") + this.modifiedPwd({ + userId:this.editConfig.userId, + oldPwd:this.ruleForm.oldPass, + newPwd:this.ruleForm.pass, + }) + + } else { + console.log('error submit!!'); + return false; + } + }); + }, + + }, + components: { + + }, +}; +</script> + +<style scoped lang="scss"> +.el-form{ + margin-top:20px; +} +::v-deep { + .el-form-item__content{ + display: flex; + flex-direction: row-reverse; + } + .el-dialog__header{ + .el-dialog__title{ + font-size:18px; + + } + } + .el-form{ + margin:20px; + } + +} +</style> diff --git a/src/components/layout/components/appHeader/index.vue b/src/components/layout/components/appHeader/index.vue index 97c2c1d..e0d2d90 100644 --- a/src/components/layout/components/appHeader/index.vue +++ b/src/components/layout/components/appHeader/index.vue @@ -4,29 +4,53 @@ <div class="header-user-info"> <div class="avatar"><el-avatar icon="el-icon-user-solid"></el-avatar></div> <el-dropdown @command="handleCommand"> - <div class="el-dropdown-link">{{ username }}<i class="el-icon-arrow-down el-icon--right"></i></div> + <div class="el-dropdown-link">浣犲ソ {{ username }}<i class="el-icon-arrow-down el-icon--right"></i></div> <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="logout">閫�鍑�</el-dropdown-item> + <el-dropdown-item @click.native="updatePwd"> + <d2-icon name="unlock" class="d2-mr-5" /> + 淇敼瀵嗙爜 + </el-dropdown-item> </el-dropdown-menu> </el-dropdown> </div> + <UpdatePassWord :editCommonConfig="editConfig"></UpdatePassWord> </div> </template> <script> import Cookies from "js-cookie" +import UpdatePassWord from "./components/updatePassWord" export default { name: "SalesLead", props: { headerTitle: String }, + components:{ + UpdatePassWord, + }, data() { return { - username: "" + username: "", + editConfig:{ + dialogVisible:false, + userId:"", + } } }, + created(){ + const userObj = Cookies.get('userObj'); + if (userObj) { + let userInfo = JSON.parse(userObj); + this.editConfig.userId=userInfo.id + this.username=userInfo.nickName + } else { + console.log('Object not found in cookie'); + } + }, mounted() { - this.username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") + + // this.username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") }, methods: { environmentType() { @@ -77,6 +101,9 @@ }) }) } + }, + updatePwd(){ + this.editConfig.dialogVisible=true } } } diff --git a/src/views/operate/allot/index.vue b/src/views/operate/allot/index.vue index 01b29bf..c846757 100644 --- a/src/views/operate/allot/index.vue +++ b/src/views/operate/allot/index.vue @@ -231,7 +231,7 @@ return { ...item, from: item.location.jointName, - // to: item.toLocation.name + to: item.toLocation.name } }) this.tableList.tableInfomation = list || [] @@ -248,9 +248,23 @@ }, // 鏌ョ湅 缂栬緫 tableRowClick(row, val) { - console.log(row) + console.log(row,"鏌ョ湅") this.editConfig.visible = true this.editConfig.title = val + row.details.map((item)=>{ + item.fromLocationId=item.fromLocation.jointName + item.toLocationId=item.toLocation.jointName + }) + row.location={ + value:row.location.id||row.location.value, + label:row.location.jointName||row.location.label + } + row.toLocation={ + value:row.toLocation.id||row.toLocation.value, + label:row.toLocation.jointName||row.toLocation.label + } + row.locationID=row.location.jointName + row.locationId=row.location.value this.editConfig.infomation = { ...row } }, // 鏂板缓 diff --git a/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue b/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue index 8da377a..f8102e2 100644 --- a/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue +++ b/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue @@ -142,8 +142,8 @@ let product = item.details[0].product return { ...item, - from: item.fromLocation.name, - to: item.toLocation.name, + from: item.fromLocation?item.fromLocation.name:"", + to: item.toLocation?item.toLocation.name:"", productName: product.name, amount: item.details[0].amount, unit: product.unit diff --git a/src/views/operate/outEnterLibrary/index.vue b/src/views/operate/outEnterLibrary/index.vue index 846578e..2008867 100644 --- a/src/views/operate/outEnterLibrary/index.vue +++ b/src/views/operate/outEnterLibrary/index.vue @@ -92,7 +92,7 @@ sessionStorage.setItem("paramsList", JSON.stringify(params)) } this.params = params - console.log(this.params,'====111') + console.log(this.params,'璺敱鍙傛暟') this.getData() }, // 椤甸潰閿�姣佷箣鍓� @@ -273,7 +273,10 @@ this.workType=row.baseOperationType this.editConfig.title = val getOperationInfo(row.operationId).then((res)=>{ - this.editConfig.infomation = { ...res.data } + this.editConfig.infomation = { + + ...res.data + } this.editConfig.visible = true }) // this.editConfig.visible = true diff --git a/src/views/operate/scrap/AddScrapDialog.vue b/src/views/operate/scrap/AddScrapDialog.vue index 3bc1094..626fb4a 100644 --- a/src/views/operate/scrap/AddScrapDialog.vue +++ b/src/views/operate/scrap/AddScrapDialog.vue @@ -113,7 +113,7 @@ style="width: 90%" :disabled="!showFooter" > - <el-option v-for="item in toLocationOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option v-for="item in toLocationOptions1" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> @@ -180,6 +180,7 @@ memberOptions: [], productOptions: [], toLocationOptions: [], + toLocationOptions1: [], list: [ { label: "鑽夌", status: "todo", value: 1 }, { label: "灏辩华", status: "todo", value: 3 }, @@ -196,7 +197,16 @@ created() { this.setBottonView() this.getProductList() - this.getLocationList() + this.getLocationList({ + isScrapLocation: true, + page: 0, + pageSize: 0 + }) + this.getLocationList({ + // isScrapLocation: true, + page: 0, + pageSize: 0 + }) this.unit = this.editConfig.infomation.unit || "" this.formInfo() }, @@ -224,17 +234,22 @@ }) }, // 鑾峰彇浠撳簱浣嶇疆鍒楄〃 - async getLocationList() { - await getLocationList({ - isScrapLocation: true, - page: 0, - pageSize: 0 - }).then((res) => { - console.log(res) - if (res.code === 200) { - this.toLocationOptions = res.data - } - }) + async getLocationList(params) { + if(params.isScrapLocation){ + await getLocationList(params).then((res) => { + console.log(res) + if (res.code === 200) { + this.toLocationOptions1 = res.data + } + }) + }else{ + await getLocationList(params).then((res) => { + console.log(res) + if (res.code === 200) { + this.toLocationOptions = res.data + } + }) + } }, // 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず setBottonView() { diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue index 2f8b26c..446e496 100644 --- a/src/views/overview/AddOverviewDialog.vue +++ b/src/views/overview/AddOverviewDialog.vue @@ -470,7 +470,8 @@ workType: { type: Number, default: function() { - return JSON.parse(window.sessionStorage.getItem('paramsData')).workType|| 1; + // return JSON.parse(window.sessionStorage.getItem('paramsData')).workType|| 1; + return 1; } }, addName: { diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue index d1b5371..3184808 100644 --- a/src/views/productManage/product/AddProductDialog.vue +++ b/src/views/productManage/product/AddProductDialog.vue @@ -130,7 +130,7 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="鍗曚綅" prop="unit"> + <el-form-item label="鍗曚綅old" prop="unit"> <el-input v-model="editConfig.infomation.unit" placeholder="璇疯緭鍏�" @@ -138,6 +138,29 @@ :disabled="!showFooter" ></el-input> </el-form-item> + + <el-form-item label="鍗曚綅" prop="unit"> + <el-select + v-model="editConfig.infomation.unit" + placeholder="鍗曚綅" + filterable + @change="$forceUpdate()" + style="width: calc(100% - 30px)" + > + <el-option + v-for="ele in unitList" + :key="ele.id" + :label="ele.name" + :value="ele.name" + ></el-option> + </el-select> + <i + class="el-icon-setting margin_left_10px cursor_pointer" + style="font-size: 20px; color: gray" + @click="handleUnitShow" + ></i> + </el-form-item> + <el-form-item label="浜у搧鏍囩" prop="productTagName"> <el-input v-model="editConfig.infomation.productTagName" @@ -505,6 +528,13 @@ <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button> </div> </el-dialog> + <BomDialog + ref="editDialog" + @sucessSet="handleGetBomKindDictList" + @handleConfirmSave="handleConfirmSave" + :workList="unitList" + title="璁¢噺鍗曚綅" + ></BomDialog> </div> </template> @@ -515,6 +545,10 @@ import { uploadFiles } from "@/api/common/other" import codeMixin from "@/components/mixin/codeMixin" import { getDataByType } from "@/api/data" +import BomDialog from "./components/bomDialog"; +// import { postGetSaveSUnitDict } from "@/api/basic/standard"; + + export default { mixins: [codeMixin], name: "AddProductDialog", @@ -531,7 +565,10 @@ } } }, - components: { IconCropper }, + components: { + IconCropper, + BomDialog, + }, computed: { modalTitle() { if (this.editConfig.title === "缂栬緫" && this.editConfig.autoEdit) { @@ -611,7 +648,8 @@ }, isView: false, fileFormdata: null, // 涓婁紶鍥剧墖鍏ュ弬 - purchaseTypeList: getDataByType("purchaseType") + purchaseTypeList: getDataByType("purchaseType"), + unitList: [], } }, created() { @@ -633,6 +671,44 @@ this.formInfo() }, methods: { + // 鍗曚綅 + handleUnitShow() { + this.handleGetBomKindDictList(); + this.$refs.editDialog.editDialogVisible = true; + }, + // 鍗曚綅 + handleGetBomKindDictList(val) { + console.log(val) + // postGetUnitDictList().then((res) => { + // this.unitList = res.data; + // if (val) { + // for (let i in this.unitList) { + // if (this.unitList[i].isDefault) { + // this.form.unit = this.form.unit + // ? this.form.unit + // : this.unitList[i].name; + // // this.$set(this.form, "unit", this.form.unit); + // break; + // } + // } + // } + // }); + }, + handleConfirmSave(data) { + console.log(data) + // postGetSaveSUnitDict({ data: data }).then((res) => { + // if (res.code == 200) { + // this.$message({ + // message: "鎿嶄綔鎴愬姛锛�", + // type: "success", + // }); + // this.$refs.editDialog.editDialogVisible = false; + // this.handleGetBomKindDictList(); + // } + // }); + this.$refs.editDialog.editDialogVisible = false; + + }, formInfo() { this.objCode.type = "鐗╂枡缂栫爜" this.objCode.codeStandID = "" diff --git a/src/views/productManage/product/components/bomDialog.vue b/src/views/productManage/product/components/bomDialog.vue new file mode 100644 index 0000000..c350b0f --- /dev/null +++ b/src/views/productManage/product/components/bomDialog.vue @@ -0,0 +1,360 @@ +<template> + <el-dialog + :close-on-click-modal="false" + :visible.sync="editDialogVisible" + width="33rem" + class="add-event-dialog" + @close="shutdown" + append-to-body + > + <div slot="title" class="tac drawerHeader"> + <!-- {{ title }}缁勪欢 --> + 缂栬緫涓嬫媺妗�>鍗曚綅 + </div> + <div class="drawerContent"> + <el-table + v-if="isTableShow" + :header-cell-style="{ background: '#f1f3f8', color: '#000009' }" + ref="multipleTable" + :data="BomTableData" + tooltip-effect="dark" + height="440" + > + <el-table-column prop="unit" label="鍗曚綅"> + <template slot-scope="scope"> + <el-input v-model="scope.row.name"></el-input> + </template> + </el-table-column> + <el-table-column prop="createdAt" label="璁句负榛樿"> + <template slot-scope="scope"> + <el-switch + @change="switchChange(scope, scope.row.isDefault)" + v-model="scope.row.isDefault" + ></el-switch> + </template> + </el-table-column> + <!-- <el-table-column label="鎿嶄綔" width="100"> + <template slot-scope="scope"> + <i + class="el-icon-delete" + id="iconStyle" + @click="handleDelete(scope.row.id)" + ></i> + </template> + </el-table-column> --> + </el-table> + <el-button + @click="handleAdd()" + type="text" + class="margin_top_15px margin_left_20px" + >鏂板涓嬫媺妗�</el-button + > + </div> + <div slot="footer" class="dialog-footer tac"> + <!-- <el-button + @click="handleAdd()" + style="margin-left: 16px; color: #fff; background-color: #ee790c" + >鏂板</el-button + > --> + <el-button @click="shutdown">鍙栨秷</el-button + ><el-button + type="primary" + @click="handleConfirmSave()" + style="margin-left: 16px; color: #fff; background-color: #2a78fb" + >纭畾</el-button + > + </div> + </el-dialog> +</template> + +<script> +import { getCodeStandardList,addMaterial, updateMaterial } from "@/api/basic/standard"; + +export default { + name: "bomDialog", + props: { + title: { + type: String, + }, + editRow: { + type: Object, + default: () => { + return {}; + }, + }, + workList: { + type: Array, + }, + }, + data() { + return { + editDialogVisible: false, + isTableShow: true, + form: {}, + BomTableData: [1], + work: 1, + flag: "add", + obj: { name: "", page: 0, pageSize: 0, type: "鐗╂枡缂栫爜" }, + inputValue: [], + codenumer: 0, //姣忔杈撳叆鐨勭紪鐮� + codenumberList: [], //鏁存潯缂栫爜 + sum: 0, + explain: "", + Tabs: "msg", + tableData: [ + { + date: "PEBU", + name: "PE甯�", + number: "21", + unit: "鍚�", + }, + ], + rules: { + id: [{ required: true, message: "璇疯緭鍏ョ墿鏂欑紪鐮�", trigger: "blur" }], + name: [{ required: true, message: "璇疯緭鍏ョ墿鏂欏悕绉�", trigger: "blur" }], + specs: [{ required: true, message: "璇疯緭鍏ョ墿鏂欒鏍�", trigger: "blur" }], + type: [{ required: true, message: "璇疯緭鍏ョ墿鏂欏瀷鍙�", trigger: "blur" }], + amount: [ + { + required: true, + message: "璇疯緭鍏ユ暟閲�", + trigger: "blur", + }, + ], + unit: [ + { + required: true, + message: "璇疯緭鍏ュ崟浣�", + trigger: "blur", + }, + ], + model: [ + { required: true, message: "璇烽�夋嫨鐗╂枡绫诲瀷", trigger: "change" }, + ], + }, + }; + }, + watch: { + editDialogVisible(newVal) { + if (newVal) { + this.BomTableData = this.workList; + } + }, + workList(newVal) { + console.log(newVal) + this.BomTableData = this.workList; + }, + }, + mounted() {}, + methods: { + handleAdd() { + this.BomTableData.push({ name: "", isDefault: false }); + }, + handleDelete(id) { + this.BomTableData = this.BomTableData.filter((i) => { + return i.id != id; + }); + }, + async getCodeStandardList() { + const res = await getCodeStandardList(this.obj); + this.codenumer = []; + this.sum = 0; + this.explain = ""; + const { rules = [] } = res.data[0]; + rules.forEach((item, index) => { + this.codenumer.push(item.length); + this.sum++; + // index - 1 + // ? (this.explain += item.name + "/") + // : (this.explain += item.name); + this.explain += item.name + (index === rules.length - 1 ? "" : "/"); + }); + this.$forceUpdate(); + }, + codeList(val) { + console.log(val, "codeList"); + this.inputValue = val; + this.codenumberList = val.toString(); + console.log(this.codenumberList.replace(/,/g, "")); + }, + switchChange(scope, val) { + let arr = []; + for (let i in this.BomTableData) { + if (this.BomTableData[i].isDefault) { + arr.push(i); + } + } + if (arr.length > 1) { + this.$message({ + message: "鍙兘璁句竴涓负榛樿", + type: "warning", + }); + scope.row.isDefault = !val; + } + }, + handleConfirmSave() { + let arr = []; + for (let i in this.BomTableData) { + if (this.BomTableData[i].isDefault) { + arr.push(i); + } + } + if (arr.length > 1) { + this.$message({ + message: "鍙兘璁句竴涓负榛樿", + type: "warning", + }); + } else { + this.$emit("handleConfirmSave", this.BomTableData); + } + }, + async validate() { + try { + if (this.flag == "add") + this.form.id = this.codenumberList.replace(/,/g, ""); + this.form.explain = this.explain; + let fn = this.flag == "set" ? updateMaterial : addMaterial; + const res = await fn(this.form); + this.shutdown(); + this.$sucessSet("sucessSet"); + if (res.code == 200) { + this.$message({ + message: this.flag == "set" ? "淇敼鎴愬姛锛�" : "娣诲姞鎴愬姛锛�", + type: "success", + }); + } + } catch (err) { + console.log(err); + this.$message({ + message: err.message.data.data, + type: "warning", + }); + } + }, + shutdown() { + this.editDialogVisible = false; + }, + }, +}; +</script> + +<style lang="scss" scoped> +.drawer { + z-index: 99; + border: 2px solid #ccc; + border-radius: 20px; + background: #fff; + width: 25vw !important; + height: 600px; + #iconStyle { + font-size: 20px !important; + } + .drawerContent { + position: relative; + overflow-y: auto; + padding: 12px 10px 0 10px; + padding-top: 12px; + margin: auto; + width: 25vw; + overflow-x: hidden; + height: 480px; + scrollbar-width: none; /* firefox */ + -ms-overflow-style: none; /* IE 10+ */ + ::v-deep .el-tabs__nav-scroll { + padding-left: 25px; + } + .baseTitle { + margin: 50px 0 20px; + font-weight: bold; + } + .baseInfo { + display: flex; + } + } + .drawerContent::-webkit-scrollbar { + display: none; /* Chrome Safari */ + } +} + +.drawerFooter { + margin-top: 16px; + margin-right: 20px; + text-align: right; + .el-button { + width: 80px; + height: 38px; + border-color: rgba(0, 0, 0, 0.1); + font-family: PingFangSC-Medium, sans-serif; + color: #000; + } +} +::v-deep .el-form { + width: 389px; + .input-box .input-content input { + margin: 0; + margin-right: 3px; + } + .el-input__inner, + .el-textarea__inner { + line-height: 18px; + font-family: PingFangSC; + } +} +::v-deep .el-tabs__header { + border: none; + .el-tabs__nav { + border: none; + } +} +::v-deep .el-form-item__content { + width: 263px; + .input-box { + width: 263px; + } +} +::v-deep .el-form-item__label { + font-size: 13px !important; + color: #000; + font-family: PingFangSC; + text-align: center !important; + width: 60px; +} +::v-deep .input-box .input-content input { + width: 23px; + height: 26px; + border-color: rgba(0, 0, 0, 0.1); + font-family: PingFangSC; +} +::v-deep .el-icon-minus { + width: 13px !important; + height: 26px !important; + line-height: 38px !important; + color: #e5e5e5; + font-size: 13px; +} +::v-deep .el-input__inner { + font-size: 13px !important; + color: rgba(0, 0, 0, 0.9); +} +::v-deep .el-input__inner::placeholder { + color: rgba(0, 0, 0, 0.4); +} +::v-deep .el-form-item__error { + font-family: PingFangSC; +} +.self { + ::v-deep .el-input__inner { + } +} +::v-deep .el-select-dropdown { + position: absolute !important; + top: 36px !important; + left: 0px !important; +} +::v-deep .el-select-dropdown__wrap { + overflow: auto !important; +} +::v-deep .el-dialog__body{ + padding-bottom:10px!important; +} +</style> diff --git a/src/views/reportForm/inboundOutboundDetail/index.vue b/src/views/reportForm/inboundOutboundDetail/index.vue index fe60a74..7d36fb4 100644 --- a/src/views/reportForm/inboundOutboundDetail/index.vue +++ b/src/views/reportForm/inboundOutboundDetail/index.vue @@ -254,8 +254,16 @@ }, // 琛岀偣鍑� async tableRowClick(row) { + console.log(row,"鐪嬬湅row") + // window.sessionStorage.sessionStorage.setItem('paramsData', { + // // name: "鎷煎澶曚粨搴�-鍑哄簱", + // workType: row.baseOperationType, + // id: row.operationId, + // // code: "PX" + // }); + await getOperationInfo(row.operationId).then((res)=>{ - this.editConfig.infomation = { ...res.data } + this.editConfig.infomation = { ...res.data,workType:res.baseOperationType } }) this.editConfig.visible = true this.editConfig.title = "鏌ョ湅" -- Gitblit v1.8.0