From 04b8eff075a04db23e6f908855699b4d2954588c Mon Sep 17 00:00:00 2001 From: yyt <306727702@qq.com> Date: 星期四, 23 五月 2024 18:47:01 +0800 Subject: [PATCH] 380新产品,优化 --- jcdm-ui/src/views/main/om/productionOrde/index.vue | 64 +++++++++++++++++++++++--------- 1 files changed, 46 insertions(+), 18 deletions(-) diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue index 50e3228..08a212b 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/index.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue @@ -1,5 +1,6 @@ <template> <div class="app-container"> + <div v-if="!showDetailFlag"> <el-card class="box-card"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label-width="100" label="鐢熶骇閫氱煡鍗�" prop="productName"> @@ -7,6 +8,9 @@ </el-form-item> <el-form-item label-width="80" label="鐢熶骇璁㈠崟" prop="workOrderNo"> <el-input v-model="queryParams.workOrderNo" placeholder="璇疯緭鍏ョ敓浜ц鍗�" clearable @keyup.enter.native="handleQuery"/> + </el-form-item> + <el-form-item style="margin-left: 14px" label="浜у搧缂栧彿" prop="productCode"> + <el-input v-model="queryParams.productCode" placeholder="璇疯緭鍏ヤ骇鍝佺紪鍙�" clearable @keyup.enter.native="handleQuery"/> </el-form-item> <!-- <el-form-item label="浜у搧鍚嶇О" prop="productName">--> <!-- <el-input v-model="queryParams.productName" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" clearable @keyup.enter.native="handleQuery"/>--> @@ -27,9 +31,6 @@ </el-form-item> </el-form> <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px"> - <el-form-item style="margin-left: 14px" label="浜у搧缂栧彿" prop="productCode"> - <el-input v-model="queryParams.productCode" placeholder="璇疯緭鍏ヤ骇鍝佺紪鍙�" clearable @keyup.enter.native="handleQuery"/> - </el-form-item> <el-form-item label="鏈哄瀷" prop="typeZ"> <el-input v-model="queryParams.typeZ" placeholder="璇疯緭鍏ユ満鍨�" clearable @keyup.enter.native="handleQuery"/> </el-form-item> @@ -114,28 +115,41 @@ v-hasPermi="['om:productionOrde:createUpdate']" >鐢熸垚</el-button> </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + :disabled="!single" + @click="goToPage" + >寮�濮嬩綔涓�</el-button> + </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table border v-loading="loading" :data="productionOrdeList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鐢熶骇閫氱煡鍗曞彿" width="160" align="center" prop="productionNotice"> + <el-table-column label="鐢熶骇閫氱煡鍗�" width="120" align="center" prop="productionNotice"> </el-table-column> - <el-table-column label="鐢熶骇璁㈠崟" width="160" align="center"> + <el-table-column label="鐢熶骇璁㈠崟" width="140" align="center"> <template slot-scope="scope"> <router-link :to="{path: '/main/orderScheduling-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type"> <span>{{ scope.row.workOrderNo }}</span> </router-link> </template> </el-table-column> - <el-table-column label="鏈哄瀷" width="160" align="center" prop="typeZ"> + <el-table-column label="鏈哄瀷" width="100" align="center" prop="typeZ"> </el-table-column> <el-table-column label="闇�姹傛暟閲�" align="center" prop="planQty"> </el-table-column> <el-table-column label="浜у搧缂栧彿" width="150" align="center" prop="productCode"> + </el-table-column> + + <el-table-column label="寮�宸ユ棩鏈�" width="120" align="center" prop="demandDate"> </el-table-column> <el-table-column label="宸ュ崟鐘舵��" align="center" prop="orderStatus"> @@ -147,9 +161,9 @@ <el-table-column label="浜х嚎" align="center" prop="lineCode"> </el-table-column> - <el-table-column label="閫氱煡鍗曞埗鍗曚汉" width="80" align="center" prop="createUser"> + <el-table-column label="鍒跺崟浜�" width="80" align="center" prop="createUser"> </el-table-column> - <el-table-column width="160" label="閫氱煡鐢熸垚鏃ユ湡" align="center" prop="createTime"> + <el-table-column width="160" label="鎺ユ敹鏃ユ湡" align="center" prop="createTime"> </el-table-column> <el-table-column label="鎴愬搧鎻忚堪" width="320" align="center" prop="productName"> </el-table-column> @@ -298,7 +312,8 @@ <el-button @click="cancel">鍙� 娑�</el-button> </div> </el-dialog> - + </div> + <Detail v-if="showDetailFlag" :singleSelect="singleSelect"></Detail> </div> </template> @@ -308,7 +323,7 @@ import { listProductBom } from "@/api/main/bs/ProductBom/ProductBom"; import { listTechnologyRoute} from "@/api/main/bs/technologyRoute/technologyRoute"; import ItemSelect from "@/components/itemSelect/single.vue"; -import { addOrderSchedulingForBoxCode,getProductionNotice, upDownMove, listProductionOrde, getProductionOrde, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde"; +import { addOrderSchedulingForBoxCode,getProductionNotice, upDownMove, listProductionOrde, getProductionOrde,getProductionOrdes, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde"; import { listOrderScheduling, getOrderScheduling, @@ -319,15 +334,19 @@ } from "@/api/main/bs/orderScheduling/orderScheduling"; import {listMaterial} from "@/api/main/bs/material/material"; import {listModelNumber} from "@/api/main/bs/modelNumber/modelNumber"; +import Detail from "./detail.vue"; export default { name: "ProductionOrde", dicts: ['order_state','year','month','day','subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'], components: { ItemSelect , + Detail }, data() { return { + showDetailFlag: false, + singleSelect:{}, titleName: '', options: [], lineOptions: [], @@ -492,10 +511,10 @@ dateTimeRule = dateTimeRule + day; dateTimeRule = dateTimeRule + this.markNo; this.form.dateTimeRule = dateTimeRule;//姝ゅ璧嬪�间笉鍔犳満鍨� - dateTimeRule = dateTimeRule + this.form.typeZ;//姝ゅ鍔犳満鍨嬶紝椤哄簭涓嶈兘棰犲�� + dateTimeRule = this.form.typeZ +" "+dateTimeRule;//姝ゅ鍔犳満鍨嬶紝椤哄簭涓嶈兘棰犲�� //璧嬪�艰捣濮嬬紪鐮� - this.form.startEndCode = dateTimeRule + String(parseInt(startCode)).padStart(3, '0') + " " + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ; + this.form.startEndCode = dateTimeRule + String(parseInt(startCode)).padStart(3, '0') + " " + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ; } }, @@ -635,7 +654,8 @@ spareField3: null, typeZ: null, spareField4: null, - adds:null + adds:null, + idNums:null }; this.resetForm("form"); }, @@ -649,7 +669,7 @@ this.resetForm("queryForm"); this.handleQuery(); }, - // 澶氶�夋閫変腑鏁版嵁 + /** 澶氶�夋閫変腑鏁版嵁 */ handleSelectionChange(selection) { this.ids = selection.map(item => item.id) this.move = selection.length!==1 @@ -661,8 +681,10 @@ this.single = false this.multiple = false } + if(selection[0].orderStatus === '2' && selection.length === 1){ + this.singleSelect = selection[0] + } } - }, /** 鏂板鎸夐挳鎿嶄綔 */ @@ -677,7 +699,7 @@ this.initWorkshop(); this.reset(); const id = Row.id || this.ids - getProductionOrde(id).then(response => { + getProductionOrdes(id).then(response => { console.log(response.data) console.log(response.data.productCode) this.materialQueryParams.materialCode = response.data.productCode; @@ -686,6 +708,7 @@ this.form.typeL = response.rows[0].typeL; }); this.form = response.data; + this.form.idNums=id; this.Createopen = true; this.titleName = "鐢熸垚绠变綋鏉$爜"; // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1); @@ -755,7 +778,7 @@ saveBoxCode(){ this.$refs["form"].validate(valid => { if (valid) { - if (this.form.id != null) { + if (this.form.idNums != null) { addOrderSchedulingForBoxCode(this.form).then(response => { this.$modal.msgSuccess("淇濆瓨鎴愬姛"); this.Createopen = false; @@ -782,7 +805,12 @@ ...this.queryParams }, `productionOrde_${new Date().getTime()}.xlsx`) }, - + goToPage() { + this.showDetailFlag=true + console.log('this.showDetailFlag',this.showDetailFlag) + //鏇存柊瀹為檯鐢熶骇鏃ユ湡 + //updateOrderInfo(this.singleSelect) + }, } }; </script> -- Gitblit v1.9.3