From f19edc96af3261347f48cb8f66f1f5b2feb6071e Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期五, 17 十一月 2023 16:43:54 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/zs-mes-before --- src/const/crud/customerOrder/customerOrderForm.js | 1 src/views/common/customerorder.vue | 70 ++++---- src/views/common/ztt-table.vue | 11 src/views/plan/masterproductionschedule/index.vue | 8 src/views/plan/manufacturingorder/index.vue | 142 ++++++++--------- src/views/common/document.vue | 14 src/views/plan/masterproductionschedule/auto-manufacturingorder.vue | 4 src/views/plan/customerorder/sample-customerorder-form.vue | 6 src/views/plan/operationtask/index.vue | 4 src/views/plan/outsourcingorder/index.vue | 127 ++++++++++++++- src/views/plan/outsourcingorder/outsourcingorder-form.vue | 31 +++ src/views/warehouse/stock/index.vue | 5 src/views/plan/manfacturingorderstatement/index.vue | 8 13 files changed, 277 insertions(+), 154 deletions(-) diff --git a/src/const/crud/customerOrder/customerOrderForm.js b/src/const/crud/customerOrder/customerOrderForm.js index 05e9d01..20f9de0 100644 --- a/src/const/crud/customerOrder/customerOrderForm.js +++ b/src/const/crud/customerOrder/customerOrderForm.js @@ -25,6 +25,7 @@ delBtn: false, align: 'center', addBtn: false, + addBtnText: '娣诲姞琛�', addRowBtn: true, cancelBtn: false, refreshBtn: false, // 鏄惁鏄剧ず鍒锋柊鎸夐挳 diff --git a/src/views/common/customerorder.vue b/src/views/common/customerorder.vue index 17f04bd..a1b2fdd 100644 --- a/src/views/common/customerorder.vue +++ b/src/views/common/customerorder.vue @@ -82,22 +82,22 @@ { minWidth: '100', width: '100px', - prop: 'customerOrderNo', + prop: 'contractNo', label: '瀹㈡埛璁㈠崟鍙�', sort: true, isTrue: true, isSearch: true, searchInfoType: 'text' }, - { - minWidth: '120', - prop: 'customerNo', - label: '瀹㈡埛缂栧彿', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '120', + // prop: 'customerNo', + // label: '瀹㈡埛缂栧彿', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, { minWidth: '120', prop: 'customerName', @@ -120,15 +120,15 @@ return this.coStateList } }, - { - minWidth: '120', - prop: 'coLineNo', - label: '琛屽彿', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '120', + // prop: 'coLineNo', + // label: '琛屽彿', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, { minWidth: '120', width: '100px', @@ -142,7 +142,7 @@ { minWidth: '120', width: '100px', - prop: 'partName', + prop: 'productName', label: '闆朵欢鍚嶇О', sort: true, isTrue: true, @@ -160,7 +160,7 @@ }, { minWidth: '140', - prop: 'requireNumber', + prop: 'buyQtyDue', label: '宸蹭笅鍙戞暟閲�', sort: true, isTrue: true, @@ -169,7 +169,7 @@ }, { minWidth: '80', - prop: 'unit', + prop: 'otcUnit', label: '闆朵欢鍗曚綅', sort: true, isTrue: true, @@ -179,25 +179,25 @@ { minWidth: '140', width: '120', - prop: 'wantedDeliveryDate', - label: '鏈熸湜浜よ揣鏃堕棿', + prop: 'deliveryDate', + label: '浜よ揣鏃堕棿', sort: true, isTrue: true, isSearch: true, searchInfoType: 'datetimerange', formatter: this.formatDutyDate }, - { - minWidth: '200', - width: '120', - prop: 'plannedDeliveryDate', - label: '璁″垝浜よ揣鏃堕棿', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'datetimerange', - formatter: this.formatDutyDate - }, + // { + // minWidth: '200', + // width: '120', + // prop: 'plannedDeliveryDate', + // label: '璁″垝浜よ揣鏃堕棿', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'datetimerange', + // formatter: this.formatDutyDate + // }, { minWidth: '200', width: '120', diff --git a/src/views/common/document.vue b/src/views/common/document.vue index fa46446..733f4a4 100644 --- a/src/views/common/document.vue +++ b/src/views/common/document.vue @@ -13,33 +13,33 @@ <el-row> <el-col :span="3"><span>鍗板瓧鏂瑰紡锛�</span></el-col> <el-col :span="3" - ><span>{{ relationOrderList[0].printType }}</span></el-col + ><span>{{ relationOrderList[0] ? relationOrderList[0].printType : "" }}</span></el-col > <el-col :span="3"><span>鍗板瓧瑕佹眰锛�</span></el-col> <el-col :span="3" - ><span>{{ relationOrderList[0].printingRequirements }}</span></el-col + ><span>{{ relationOrderList[0] ? relationOrderList[0].printingRequirements : "" }}</span></el-col > <el-col :span="3"><span>鐩橀暱瑕佹眰锛�</span></el-col> <el-col :span="3" - ><span>{{ relationOrderList[0].lengthRequirement }}</span></el-col + ><span>{{ relationOrderList[0] ? relationOrderList[0].lengthRequirement : "" }}</span></el-col > <el-col :span="3"><span>鍖呰瑕佹眰锛�</span></el-col> <el-col :span="3" - ><span>{{ relationOrderList[0].packageRequire }}</span></el-col + ><span>{{ relationOrderList[0] ? relationOrderList[0].packageRequire : "" }}</span></el-col > </el-row> <el-row> <el-col :span="3"><span>璐ㄩ噺瑕佹眰锛�</span></el-col> <el-col :span="3" - ><span>{{ relationOrderList[0].qualityRequire }}</span></el-col + ><span>{{ relationOrderList[0] ? relationOrderList[0].qualityRequire : "" }}</span></el-col > <el-col :span="3"><span>鐢熶骇闇�姹傝鏄庯細</span></el-col> <el-col :span="3" - ><span>{{ relationOrderList[0].otherProductRequire }}</span></el-col + ><span>{{ relationOrderList[0] ? relationOrderList[0].otherProductRequire : "" }}</span></el-col > <el-col :span="3"><span>澶囨敞锛�</span></el-col> <el-col :span="9" - ><span>{{ relationOrderList[0].remark }}</span></el-col + ><span>{{ relationOrderList[0] ? relationOrderList[0].remark : "" }}</span></el-col > </el-row> </div> diff --git a/src/views/common/ztt-table.vue b/src/views/common/ztt-table.vue index 54ffcda..d7d6869 100644 --- a/src/views/common/ztt-table.vue +++ b/src/views/common/ztt-table.vue @@ -143,7 +143,7 @@ height ? fixHeight ? fixHeight - : undefined + : '100px' : $store.getters.tableHeight - otherHeight " v-bind="$attrs" @@ -168,7 +168,6 @@ :span-method="objectSpanMethod" :header-cell-style="tableHeaderStyle" v-adaptive="{ bottomOffset: bottomOffset, fixedHeight: fixedHeight }" - height="100px" :class="[ 'commonTable', isGeneralSearch && !isEdit @@ -226,7 +225,7 @@ :sortable="!isEdit ? (item.sort ? 'custom' : item.sort) : false" v-bind="$attrs" v-on="$listeners" - v-if="item.isTrue" + v-show="item.isTrue" :class-name=" (orderBy == null && item.prop == options.defaultOrderBy.column) || (orderBy != null && @@ -250,7 +249,7 @@ :width="inMemoryColWidth[item.prop] || item.width" :prop="item.prop" > - <template slot="header" slot-scope="scope"> + <template slot="header"> <template v-if="item.isSearch"> <div class="th" @click.stop> <template @@ -507,7 +506,9 @@ <i class="el-icon-upload"></i> <div class="el-upload__text"><em>鐐瑰嚮瀵煎叆鏁版嵁</em></div> <div class="el-upload__tip" slot="tip"> - 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�30M<el-button + <span v-if="uploadInfo.tipText" v-text="uploadInfo.tipText"></span> + <span v-else>鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�30M銆�</span> + <el-button type="text" style="font-size:15px;text-decoration: underline;" @click="downDataTemplate" diff --git a/src/views/plan/customerorder/sample-customerorder-form.vue b/src/views/plan/customerorder/sample-customerorder-form.vue index 9e5873c..151083b 100644 --- a/src/views/plan/customerorder/sample-customerorder-form.vue +++ b/src/views/plan/customerorder/sample-customerorder-form.vue @@ -401,7 +401,6 @@ watch:{ visible(newVal){ if(!newVal){ - this.tableData = [{ "$cellEdit": true, "$index": 0, @@ -609,4 +608,9 @@ color: #c0c4cc; margin: -1px 0; } +.avue-crud .avue-crud__left .el-button{ + margin-right: 8px; + margin-bottom: 8px; + border-radius: 0px; +} </style> \ No newline at end of file diff --git a/src/views/plan/manfacturingorderstatement/index.vue b/src/views/plan/manfacturingorderstatement/index.vue index 8a8d39f..85c6a24 100644 --- a/src/views/plan/manfacturingorderstatement/index.vue +++ b/src/views/plan/manfacturingorderstatement/index.vue @@ -26,7 +26,7 @@ </el-input> </div> </el-col> - <el-col :span="1" offset="1"> + <el-col :span="1" :offset="1"> <div> <el-divider direction="vertical"></el-divider> <div @@ -49,7 +49,7 @@ </el-input> </div> </el-col> - <el-col :span="1" offset="1"> + <el-col :span="1" :offset="1"> <div> <el-divider direction="vertical"></el-divider> <div @@ -72,7 +72,7 @@ </el-input> </div> </el-col> - <el-col :span="1" offset="1"> + <el-col :span="1" :offset="1"> <div> <el-divider direction="vertical"></el-divider> <div @@ -98,7 +98,7 @@ </el-date-picker> </div> </el-col> - <el-col :span="2" offset="1"> + <el-col :span="2" :offset="1"> <el-button type="primary" @click="getDataList()">鎼滅储</el-button> </el-col> </el-row> diff --git a/src/views/plan/manufacturingorder/index.vue b/src/views/plan/manufacturingorder/index.vue index 2f08f2a..d90208e 100644 --- a/src/views/plan/manufacturingorder/index.vue +++ b/src/views/plan/manufacturingorder/index.vue @@ -22,9 +22,9 @@ </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item - :key="item" + :key="index" :command="item.command" - v-for="item in taskTypeArr" + v-for="(item,index) in taskTypeArr" :disabled="canCreateTask" >{{ item.label }}</el-dropdown-item > @@ -41,20 +41,20 @@ </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item - :key="item" + :key="index" :command="item.command" - v-for="item in stateTagArr" + v-for="(item,index) in stateTagArr" :disabled="item.disabled" >{{ item.label }}</el-dropdown-item > </el-dropdown-menu> </el-dropdown> - <el-dropdown + <!-- <el-dropdown v-if="permissions.manufacturingorder_issue_material" @command="issueMaterialHandleCommand" style="margin-left:10px;" - > + > --> <!-- <el-button> 鍙戞枡<i class="el-icon-arrow-down el-icon--right"></i> </el-button> --> @@ -66,7 +66,7 @@ >{{ item.label }}</el-dropdown-item > </el-dropdown-menu> --> - </el-dropdown> + <!-- </el-dropdown> --> <!-- <el-button v-if="permissions.manufacturingorder_orderto_ifs" @click="commitOrderIfs()" @@ -326,7 +326,7 @@ sort: true, isTrue: true, formatter: this.formatState, - propVal: '01planned', + // propVal: '01planned', isSearch: true, searchInfoType: 'select', optList: () => { @@ -492,27 +492,25 @@ isSearch: true, searchInfoType: 'text' }, + // { + // minWidth: '120', + // prop: 'outerColor', + // label: '澶栨姢棰滆壊', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, - { - minWidth: '120', - prop: 'outerColor', - label: '澶栨姢棰滆壊', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - - { - minWidth: '120', - prop: 'insulationColor', - label: '缁濈紭棰滆壊', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - + // { + // minWidth: '120', + // prop: 'insulationColor', + // label: '缁濈紭棰滆壊', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, { minWidth: '120', prop: 'qtyRequired', @@ -632,42 +630,42 @@ isSearch: true, searchInfoType: 'text' }, - { - minWidth: '100', - prop: 'oriIfsOrderNo', - label: '鍘烮FS璁㈠崟鍙�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '100', - prop: 'ifsOrderNo', - label: 'IFS璁㈠崟鍙�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '100', - prop: 'ifsReleaseNo', - label: 'IFS涓嬭揪鍙�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '100', - prop: 'ifsSequenceNo', - label: 'IFS搴忓垪鍙�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '100', + // prop: 'oriIfsOrderNo', + // label: '鍘烮FS璁㈠崟鍙�', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, + // { + // minWidth: '100', + // prop: 'ifsOrderNo', + // label: 'IFS璁㈠崟鍙�', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, + // { + // minWidth: '100', + // prop: 'ifsReleaseNo', + // label: 'IFS涓嬭揪鍙�', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, + // { + // minWidth: '100', + // prop: 'ifsSequenceNo', + // label: 'IFS搴忓垪鍙�', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text' + // }, { minWidth: '100', prop: 'qtyApply', @@ -692,7 +690,7 @@ minWidth: '140', width: '120', prop: 'endDate', - label: '鍒版湡鏃�', + label: '鍒版湡鏃堕棿', sort: true, isTrue: true, isSearch: true, @@ -1035,13 +1033,13 @@ }, initQueryParams() { const queryParam = [] - queryParam.push( - Object.assign({ - prop: 'state', - searchInfoType: 'select', - propVal: '01planned' - }) - ) + // queryParam.push( + // Object.assign({ + // prop: 'state', + // searchInfoType: 'select', + // propVal: '01planned' + // }) + // ) this.$refs.manufacturingOrderTable.setQueryParam(queryParam) this.getData() }, diff --git a/src/views/plan/masterproductionschedule/auto-manufacturingorder.vue b/src/views/plan/masterproductionschedule/auto-manufacturingorder.vue index d99014c..98b16cc 100644 --- a/src/views/plan/masterproductionschedule/auto-manufacturingorder.vue +++ b/src/views/plan/masterproductionschedule/auto-manufacturingorder.vue @@ -155,7 +155,7 @@ </el-select> </template> </el-table-column> - <el-table-column + <!-- <el-table-column prop="isReportOperation" label="IFS杞﹂棿璁㈠崟鎺ユ敹鏃舵姤鍛婂伐搴�" align="center" @@ -163,7 +163,7 @@ <template slot-scope="scope"> <span>{{ scope.row.isReportOperation ? '鏄�' : '鍚�' }}</span> </template> - </el-table-column> + </el-table-column> --> </el-table> </div> </div> diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue index 1d87c52..4affbcb 100644 --- a/src/views/plan/masterproductionschedule/index.vue +++ b/src/views/plan/masterproductionschedule/index.vue @@ -9,7 +9,7 @@ 杞﹂棿璁㈠崟<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> - <el-dropdown-item :key="item" :command="item.command" v-for="item in orderTypeArr" :disabled="item.disabled">{{ + <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in orderTypeArr" :disabled="item.disabled">{{ item.label }}</el-dropdown-item> </el-dropdown-menu> </el-dropdown> @@ -20,7 +20,7 @@ 鐘舵�佹敼鍙�<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> - <el-dropdown-item :key="item" :command="item.command" v-for="item in stateTagArr" :disabled="item.disabled">{{ + <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in stateTagArr" :disabled="item.disabled">{{ item.label }}</el-dropdown-item> </el-dropdown-menu> </el-dropdown> @@ -31,7 +31,7 @@ 宸ヨ壓鏂囦欢<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> - <el-dropdown-item :key="item" :command="item.command" v-for="item in documentTagArr" :disabled="item.disabled"> + <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in documentTagArr" :disabled="item.disabled"> {{ item.label }} </el-dropdown-item> </el-dropdown-menu> @@ -43,7 +43,7 @@ 瀹℃牳鐘舵�佹敼鍙�<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> - <el-dropdown-item :key="item" :command="item.command" v-for="item in commitStateTagArr" :disabled="item.disabled">{{item.label }}</el-dropdown-item> + <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in commitStateTagArr" :disabled="item.disabled">{{item.label }}</el-dropdown-item> </el-dropdown-menu> </el-dropdown> <!-- <el-button v-if="permissions.masterproductionschedule_submit_oa" @click="commitOa()" type="primary" diff --git a/src/views/plan/operationtask/index.vue b/src/views/plan/operationtask/index.vue index 15f019c..b0424a6 100644 --- a/src/views/plan/operationtask/index.vue +++ b/src/views/plan/operationtask/index.vue @@ -21,9 +21,9 @@ </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item - :key="item" + :key="index" :command="item.command" - v-for="item in stateTagArr" + v-for="(item,index) in stateTagArr" :disabled="item.disabled" >{{ item.label }}</el-dropdown-item > diff --git a/src/views/plan/outsourcingorder/index.vue b/src/views/plan/outsourcingorder/index.vue index 2a82f99..858ffa0 100644 --- a/src/views/plan/outsourcingorder/index.vue +++ b/src/views/plan/outsourcingorder/index.vue @@ -18,13 +18,9 @@ 鐘舵�佸彉鏇�<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> - <template v-for="item in stateTagArr"> - <el-dropdown-item - :command="item.command" - :disabled="item.disabled"> - {{ item.eventName }} - </el-dropdown-item> - </template> + <el-dropdown-item v-for="(item, index) in stateTagArr" :key="index" :command="item.command" :disabled="item.disabled"> + {{ item.eventName }} + </el-dropdown-item> </el-dropdown-menu> </el-dropdown> <el-dropdown @command="handleCommandOa" style="margin-left: 10px"> @@ -32,8 +28,8 @@ 瀹℃牳鍙樻洿<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> - <template v-for="item in oaStateTagArr"> - <el-dropdown-item :key="item" :command="item.command" v-if="item.isShow" + <template v-for="(item, index) in oaStateTagArr"> + <el-dropdown-item :key="index" :command="item.command" v-if="item.isShow" >{{ item.eventName }} </el-dropdown-item> </template> @@ -70,6 +66,16 @@ @refreshOutsourcingOrder="refreshOutsourcingOrder" ></outsourcing-order-stock-form> </basic-container> + <el-dialog + title="鎻愮ず" + :visible.sync="showForeignDialog" + width="30%"> + <span>杩欐槸涓�娈典俊鎭�</span> + <span slot="footer" class="dialog-footer"> + <el-button @click="showForeignDialog = false">鍙� 娑�</el-button> + <el-button type="primary" @click="showForeignDialog = false">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -90,10 +96,12 @@ import TableForm from './outsourcingorder-form' import OutsourcingOrderStockForm from './outsourcingorderstock-form' import { value2label, dateTime2date } from '@/util/formatUtil' +import { log } from '@chenfengyuan/vue-qrcode' export default { data() { return { + showForeignDialog: false, ajaxFun: fetchListOutsourcingOrder, addOrUpdateVisible: false, addOrUpdateJoinVisible: false, @@ -250,6 +258,19 @@ }, { minWidth: '140', + prop: 'foreignState', + label: '瀵瑰鐩村彂鐘舵��', + sort: true, + isTrue: true, + formatter: this.formatForeignState, + isSearch: true, + searchInfoType: 'select', + optList: () => { + return this.foreignStateList + } + }, + { + minWidth: '140', prop: 'state', label: '鐘舵��', sort: true, @@ -335,16 +356,54 @@ type: 'primary', loading: false, fun: this.launchOaProcess + }, + { + text: '鏂板澶栧崗鐩村彂鐢宠鍗�', + type: 'primary', + loading: false, + fun: this.showForeign + }, + ], + operator:[ + { + text: '鎵撳嵃鍙戞枡鍗�', + type: 'text', + size: 'small', + show: { + val: [ + '03pass' + ], + key: 'oaState' + } + }, + { + text: '鎵撳嵃妯″叿澶栧崗鐢熶骇鍗�', + type: 'text', + size: 'small', + show: { + val: [ + '03pass' + ], + key: 'oaState' + } } ], operatorConfig: { fixed: 'right', label: '鎿嶄綔', - width: 100, - minWidth: 100 + width: 230, + minWidth: 230 } }, - + foreignStateList: [ + { + label: '鏄�', + value: 0 + },{ + label: '鍚�', + value: 1 + } + ], paramObj: { outsourcingOrderId: 0 }, joinAjaxFun: fetchList, joinMultipleSelection: [], @@ -449,8 +508,8 @@ operatorConfig: { fixed: 'right', label: '鎿嶄綔', - width: 60, - minWidth: 60 + width: 100, + minWidth: 100 } } } @@ -464,6 +523,24 @@ ...mapGetters(['permissions']) }, methods: { + //灞曠ず鏂板澶栧崗鐩村彂妯℃�佹 + showForeign(){ + let data = this.currentOutsourcingOrder + if(data){ + if(data.foreignState == "1"){ + this.$message.warning("璇ヨ鍗曟棤闇�澶栧崗鐩村彂鐢宠鍗�") + return + } + if(data.foreignState == "0" && data.foreignId!= null){ + this.$message.warning("璇ヨ鍗曞凡鏈夊鍗忕洿鍙戠敵璇峰崟") + return + } + // + this.$message.success("鏂板") + }else{ + this.$message.warning("璇烽�夋嫨涓�鏉″澶栬鍗�") + } + }, // 鑾峰彇鏁版嵁鍒楄〃 getData() { this.$refs.outsourcingOrderTable.refreshData() @@ -472,12 +549,19 @@ addOrUpdateHandle(row) { this.addOrUpdateVisible = true this.$nextTick(() => { - this.$refs.addOrUpdate.init(row == null ? null : row.id) + this.$refs.addOrUpdate.init(row == null ? null : row.id,null,row == null ? null : row.mpsId) }) }, // 鍙戣捣OA瀹℃牳娴佺▼ launchOaProcess() { if (this.currentOutsourcingOrder) { + let foreignState = this.currentOutsourcingOrder.foreignState + let foreignId = this.currentOutsourcingOrder.foreignId + console.log(this.currentOutsourcingOrder); + if(foreignState == 0 && foreignId==null){ + this.$message.warning("璇峰厛鏂板澶栧崗鐩村彂鐢宠鍗�") + return + } this.table.toolbar[1].loading = true approvalOaByOutsourcingOrderId(this.currentOutsourcingOrder.id) .then((data) => { @@ -500,6 +584,15 @@ // 鐘舵�佹牸寮忓寲 formatState(row, column, cellValue) { return value2label(cellValue, this.stateTagArr) + }, + //澶栧崗鐩村彂鐘舵�佹牸寮忓寲 + formatForeignState(row,column,cellValue){ + this.foreignStateList.forEach(obj=>{ + if(obj.value==cellValue){ + cellValue = obj.label + } + }) + return cellValue }, // OA鐘舵�佹牸寮忓寲 formatOaState(row, column, cellValue) { @@ -586,6 +679,10 @@ // 搴撳瓨鎺ユ敹 addOrUpdateStockHandle(row) { if (this.currentOutsourcingOrder) { + if(this.currentOutsourcingOrder.foreignState == "0"){ + this.$message.error('澶栧崗鐩村彂涓嶆帴鏀跺簱瀛�') + return + } this.addOrUpdateJoinVisible = true this.$nextTick(() => { this.$refs.addOrUpdateJoin.init( diff --git a/src/views/plan/outsourcingorder/outsourcingorder-form.vue b/src/views/plan/outsourcingorder/outsourcingorder-form.vue index 1f39da7..de15f2b 100644 --- a/src/views/plan/outsourcingorder/outsourcingorder-form.vue +++ b/src/views/plan/outsourcingorder/outsourcingorder-form.vue @@ -9,7 +9,7 @@ :rules="dataRule" :disabled="editable" ref="dataForm" - label-width="100px" + label-width="110px" class="l-mes" > <el-row :gutter="10"> @@ -37,6 +37,7 @@ <el-col :span="12"> <el-form-item label="闇�姹傛暟閲�" prop="qtyRequired"> <el-input + style="width:100%" v-model="dataForm.qtyRequired" @change="checkNumber()" ></el-input> @@ -61,6 +62,18 @@ <el-input v-model="dataForm.remark"></el-input> </el-form-item> </el-col> + <el-col :span="12"> + <el-form-item label="鏄惁澶栧崗鐩村彂" prop="foreignState"> + <el-switch + v-model="dataForm.foreignState" + active-text="鏄�" + inactive-text="鍚�" + active-value="0" + inactive-value="1" + active-color="#13ce66"> + </el-switch> + </el-form-item> + </el-col> </el-row> </el-form> <span slot="footer" class="dialog-footer"> @@ -82,7 +95,8 @@ addOutsourcingOrder, putOutsourcingOrder } from '@/api/plan/outsourcingorder' -import { validateSixDecimalNotNull } from '@/util/validate' +import { getObj } from '@/api/plan/masterproductionschedule' +import { validatePositiveInteger } from '@/util/validate' import partDialog from '@/views/common/part.vue' export default { @@ -102,13 +116,14 @@ qtyRequired: '', requiredDate: '', remark: '', - mpsId: null + mpsId: null, + foreignState: null, }, dataRule: { partId: [{ required: true, message: '闆朵欢涓嶈兘涓虹┖', trigger: 'blur' }], qtyRequired: [ { required: true, message: '闇�姹傛暟閲忎笉鑳戒负绌�', trigger: 'blur' }, - { validator: validateSixDecimalNotNull, trigger: 'blur' } + { validator: validatePositiveInteger, trigger: 'blur' }, ], requiredDate: [ { required: true, message: '闇�姹傛棩鏈熶笉鑳戒负绌�', trigger: 'blur' } @@ -119,7 +134,7 @@ }, created() {}, methods: { - init(id, masterProductionSchedule) { + init(id, masterProductionSchedule,mpsId) { this.dataForm.id = id || 0 this.visible = true this.$nextTick(() => { @@ -129,13 +144,14 @@ this.dataForm = response.data.data }) } + // 浠庝富鐢熶骇璁″垝杩囨潵鐨勶紝甯︿笂闆朵欢 if (masterProductionSchedule) { + this.dataForm.qtyRequired = masterProductionSchedule.qtyRequired this.dataForm.partNo = masterProductionSchedule.partNo this.dataForm.partName = masterProductionSchedule.partName this.dataForm.partId = masterProductionSchedule.partId this.dataForm.mpsId = masterProductionSchedule.id - this.dataForm.qtyRequired = masterProductionSchedule.qtyRequired this.dataForm.requiredDate = masterProductionSchedule.requiredDate } }) @@ -179,7 +195,8 @@ } }, // 妫�楠岄渶姹傛暟閲� - checkNumber() {}, + checkNumber() { + }, // 妫�楠岄渶姹傛棩鏈� checkDate() {} }, diff --git a/src/views/warehouse/stock/index.vue b/src/views/warehouse/stock/index.vue index c95ee8d..5b6d7f8 100644 --- a/src/views/warehouse/stock/index.vue +++ b/src/views/warehouse/stock/index.vue @@ -8,6 +8,7 @@ :prelang="prelang" :options="options" :ajaxFun="ajaxFun" + :paramObj="paramObj" ref="warehouseStockTable" > <template #toolbar> @@ -60,6 +61,7 @@ export default { data() { return { + paramObj: {}, stockVisible: false, ajaxFun: realTimeStockPage, multipleSelection: [], @@ -392,6 +394,9 @@ ...mapGetters(['permissions']) }, activated() { + this.paramObj = { + partNo: this.$route.query.partNo + } this.getData() }, methods: { -- Gitblit v1.9.3