From 980c3462a70d137b3f54f171c7989bb4cfe3b4ef Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 11 一月 2024 17:47:50 +0800
Subject: [PATCH] 包装检验模板管理-修改
---
src/views/plan/manufacturingorder/productorder-form.vue | 163 ++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 140 insertions(+), 23 deletions(-)
diff --git a/src/views/plan/manufacturingorder/productorder-form.vue b/src/views/plan/manufacturingorder/productorder-form.vue
index 9117086..0fb9e74 100644
--- a/src/views/plan/manufacturingorder/productorder-form.vue
+++ b/src/views/plan/manufacturingorder/productorder-form.vue
@@ -79,7 +79,7 @@
</el-col>
</el-row>
<el-row :gutter="10">
- <el-col :span="3">
+ <el-col :span="4">
<el-form-item label="闇�姹傛暟閲�" prop="qtyRequired">
<el-input
v-model="dataForm.qtyRequired"
@@ -88,7 +88,7 @@
></el-input>
</el-form-item>
</el-col>
- <el-col :span="3">
+ <el-col :span="4">
<el-form-item label="瀹屾垚鏁伴噺" prop="qtyFinished">
<el-input-number
style= "width: 90%"
@@ -128,12 +128,15 @@
></el-input>
</el-form-item>
</el-col> -->
- <el-col :span="6">
+ <el-col :span="5">
<el-form-item label="澶囨敞" prop="remark">
- <el-input v-model="dataForm.remark" placeholder=""></el-input>
+ <el-tooltip class="item" effect="dark" :content="dataForm.remark">
+ <el-input v-model="dataForm.remark" placeholder="">
+ </el-input>
+ </el-tooltip>
</el-form-item>
</el-col>
- <el-col :span="6">
+ <el-col :span="5">
<el-form-item label="鍒堕�犲睘鎬�" prop="manufactureAttr">
<el-select
v-model="dataForm.manufactureAttr"
@@ -149,6 +152,14 @@
>
</el-option>
</el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="10">
+ <el-form-item label="宸ヨ壓鏂囦欢" prop="technologyDocumentName">
+ <el-tooltip class="item" effect="dark" :content="dataForm.technologyDocumentName">
+ <el-input v-model="dataForm.technologyDocumentName" placeholder="">
+ </el-input>
+ </el-tooltip>
</el-form-item>
</el-col>
</el-row>
@@ -206,7 +217,7 @@
</el-switch>
</el-form-item>
</el-col> -->
-
+
</div>
<div class="productorder-detail">
<el-card class="productorder-list">
@@ -254,11 +265,22 @@
</el-form-item>
</el-col>
</el-row>
-
<el-row>
<el-col :span="24" class="productorder-operates-col">
- <el-card class="productorder-operates">
- <el-table
+ <el-card class="productorder-operates" >
+ <el-row>
+ <el-col :span="2" class="frame1">搴忓彿
+ </el-col>
+ <el-col :span="4" class="frame1">宸ュ簭鍙�
+ </el-col>
+ <el-col :span="5" class="frame1">宸ュ簭鎻忚堪
+ </el-col>
+ <el-col :span="9" class="frame1">闆朵欢
+ </el-col>
+ <el-col :span="3" class="frame1">鎿嶄綔
+ </el-col>
+ </el-row>
+ <!-- <el-table
ref="operationTable"
:data="operations"
style="width: 100%;"
@@ -306,10 +328,56 @@
</el-button>
</template>
</el-table-column>
- </el-table>
+ </el-table> -->
+ <zttdraggable
+ :forceFallback="true"
+ :list="operations"
+ :animation="200"
+ fallbackClass="fallbackStyle"
+ ghostClass="item_ghost"
+ @end="dragEnd"
+ >
+ <div
+ :class="{ dragItem: true, active: x.active }"
+ v-for="(x, i) in operations"
+ :key="i"
+ >
+ <!-- <div class="dragBody">
+ <div class="info">{{ x.operationNo }}</div>
+ <div class="info">{{ x.operationName }}</div>
+ <div class="info">{{ x.partName }}</div>
+ </div> -->
+ <el-row>
+ <el-col :span="2" class="frame">{{ i+1 }}
+ </el-col>
+ <el-col :span="4" class="frame">{{ x.operationNo }}
+ </el-col>
+ <el-col :span="5" class="frame">{{ x.operationName }}
+ </el-col>
+ <el-col :span="9" class="frame">{{ x.partName }}
+ </el-col>
+ <el-col :span="3" class="frame">
+ <el-button
+ type="text"
+ size="mini"
+ @click="openOrderOperation(x)"
+ >缂栬緫
+ </el-button>
+ </el-col>
+ </el-row>
+ </div>
+ </zttdraggable>
</el-card>
</el-col>
</el-row>
+
+
+
+
+
+
+
+
</el-col>
<el-col :span="16">
<el-tabs type="card" ref="paramTabs">
@@ -692,13 +760,13 @@
label="鍗曚綅"
/>
- <el-table-column
+ <!-- <el-table-column
prop="discNum"
width="150"
header-align="center"
align="center"
label="鐩樻暟(鐩�)"
- />
+ /> -->
<!-- <el-table-column
prop="version"
@@ -915,7 +983,27 @@
/>
</div>
</template>
-<style>
+<style lang="scss">
+.frame{
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100px;
+ // border-width: 1px;
+ // border-color: rgb(129, 129, 129);
+ // border-style: solid;
+ font-size: 15px;
+}
+.frame1{
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 50px;
+ // border-width: 1px;
+ // border-color: rgb(129, 129, 129);
+ // border-style: solid;
+ font-size: 15px;
+}
.productorder-basic {
background-color: #fff;
height: 150px;
@@ -954,6 +1042,7 @@
.productorder-operates {
height: 605px;
border: 1px solid #ddd;
+ overflow: auto;
}
.productorder-params-template {
@@ -1005,7 +1094,8 @@
addRoutingTemplateParamLedForOrder,
updateMoBom,
delMoBom,
- bomSelectChange
+ bomSelectChange,
+ changeOrder,
} from '@/api/plan/manufacturingorder'
import { qryMoSamplingRule, delMoSamplingRule } from '@/api/plan/mosamplingrule'
import {
@@ -1035,7 +1125,7 @@
import spotCheckRule from './orderSpotCheckRule'
import spotCheckRuleEdit from './orderSpotCheckRuleEdit'
import { mapGetters } from 'vuex'
-
+import zttdraggable from 'vuedraggable'
export default {
components: {
CustomerOrder,
@@ -1051,7 +1141,8 @@
operationDialog,
insertOperationDialog,
spotCheckRule,
- spotCheckRuleEdit
+ spotCheckRuleEdit,
+ zttdraggable
},
data() {
@@ -1110,7 +1201,9 @@
endDate: null,
manufactureAttr: 'N',
isReportOperation: false,
- outPutBatchList: []
+ outPutBatchList: [],
+ technologyDocumentId: null,
+ technologyDocumentName: null,
},
currentRow: [],
currentRouting: {}, // 褰撳墠閫夋嫨鐨勫伐鑹�
@@ -1121,6 +1214,9 @@
operationTemplateList: [], // 鍙傛暟闆�
templateParamList: [], // 鍙傛暟
dataRule: {
+ technologyDocumentName:[
+ { required: true, message: '宸ヨ壓鏂囦欢涓嶈兘涓虹┖', trigger: 'blur' }
+ ],
workshopTypeCode: [
{ required: true, message: '杞﹂棿璁㈠崟绫诲瀷涓嶈兘涓虹┖', trigger: 'blur' }
],
@@ -1316,6 +1412,28 @@
}
},
methods: {
+ dragEnd(e){
+ this.operations.forEach((e, i) => {
+ e.index = i + 1
+ e.operationOrder = i+1
+ })
+ console.log(this.operations,"鎷栨嫿缁撴潫kk");
+ this.dragEndstart()
+ },
+ dragEndstart(){
+ let data = this.operations.map(el =>{
+ return {
+ id:el.id,
+ operationOrder:el.operationOrder,
+ }
+ })
+ console.log(data,"id");
+ changeOrder(data).then((res) =>{
+ console.log(res,"鍥炶皟");
+ }).catch(error => {
+ console.error(error)
+ });
+ },
getSysParam(paramKey) {
getSysParam(paramKey).then((response) => {
var paramVal = response.data.data
@@ -1417,13 +1535,7 @@
checkPart(value, this.dataForm.workshopTypeCode)
.then((response) => {
const manufacturingOrderDTO = response.data.data
- /* this.dataForm.routingList = manufacturingOrderDTO.routingList.filter(
- (e) => e.bomTypeDb === this.dataForm.workshopTypeCode
- ) */
this.dataForm.routingList = manufacturingOrderDTO.routingList
- /* this.dataForm.bomList = manufacturingOrderDTO.bomList.filter(
- (e) => e.bomTypeDb === this.dataForm.workshopTypeCode
- ) */
this.dataForm.bomList = manufacturingOrderDTO.bomList
this.dataForm.technologyRoutingId =
manufacturingOrderDTO.technologyRoutingId
@@ -1559,10 +1671,13 @@
this.showRouting = true
},
selectRouting(param) {
+ console.log(param);
if (param) {
this.dataForm.partNo = param.partNo
this.dataForm.partName = param.partName
this.dataForm.partId = param.partId
+ this.dataForm.technologyDocumentId = param.id
+ this.dataForm.technologyDocumentName = param.name
this.$refs.dataForm.validateField('partId', (valid) => {})
}
},
@@ -1582,6 +1697,8 @@
})
},
// 2.tabs-宸ヨ壓璺嚎
+ //宸ヨ壓鏂囦欢閫夋嫨
+
// 宸ヨ壓璺嚎閫夋嫨
routingSelectChanged(routingId) {
this.currentRouting = this.dataForm.routingList.find(
--
Gitblit v1.9.3