From c205e0765ae18536a5b15b5ecbd5d3d0558b57fc Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 18 一月 2024 17:29:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/plan/manufacturingorder/productorder-form.vue | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 103 insertions(+), 9 deletions(-)
diff --git a/src/views/plan/manufacturingorder/productorder-form.vue b/src/views/plan/manufacturingorder/productorder-form.vue
index 081be95..50a0c0c 100644
--- a/src/views/plan/manufacturingorder/productorder-form.vue
+++ b/src/views/plan/manufacturingorder/productorder-form.vue
@@ -265,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%;"
@@ -317,10 +328,49 @@
</el-button>
</template>
</el-table-column>
- </el-table>
+ </el-table> -->
+ <zttdraggable
+ :forceFallback="true"
+ :list="operations"
+ :animation="200"
+ fallbackClass="fallbackStyle"
+ ghostClass="item_ghost"
+ @end="dragEnd"
+ :default-sort="{ prop: 'operationOrder' }"
+ @choose="operationRowClick"
+ >
+ <div
+ :class="{ dragItem: true, active: x.active }"
+ v-for="(x, i) in operations"
+ :key="i"
+ >
+ <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">
@@ -926,7 +976,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;
@@ -965,6 +1035,7 @@
.productorder-operates {
height: 605px;
border: 1px solid #ddd;
+ overflow: auto;
}
.productorder-params-template {
@@ -1016,7 +1087,8 @@
addRoutingTemplateParamLedForOrder,
updateMoBom,
delMoBom,
- bomSelectChange
+ bomSelectChange,
+ changeOrder,
} from '@/api/plan/manufacturingorder'
import { qryMoSamplingRule, delMoSamplingRule } from '@/api/plan/mosamplingrule'
import {
@@ -1046,7 +1118,7 @@
import spotCheckRule from './orderSpotCheckRule'
import spotCheckRuleEdit from './orderSpotCheckRuleEdit'
import { mapGetters } from 'vuex'
-
+import zttdraggable from 'vuedraggable'
export default {
components: {
CustomerOrder,
@@ -1062,7 +1134,8 @@
operationDialog,
insertOperationDialog,
spotCheckRule,
- spotCheckRuleEdit
+ spotCheckRuleEdit,
+ zttdraggable
},
data() {
@@ -1332,6 +1405,26 @@
}
},
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,
+ }
+ })
+ changeOrder(data).then((res) =>{
+ }).catch(error => {
+ console.error(error)
+ });
+ },
getSysParam(paramKey) {
getSysParam(paramKey).then((response) => {
var paramVal = response.data.data
@@ -1669,7 +1762,8 @@
this.dataForm.bomId = null
},
// 鐐瑰嚮宸ヨ壓宸ュ簭琛岃Е鍙戞牎楠屽伐鑹烘槸鍚︿慨鏀癸紝鑻ヤ慨鏀瑰垯涓嶅彲鎿嶄綔锛岄渶鍏堜繚瀛橈紝鑻ユ湭淇敼锛屽垯鍙煡璇㈠嚭瀵瑰簲鐨勫弬鏁伴泦
- operationRowClick(row) {
+ operationRowClick(event) {
+ const row = this.operations[event.oldIndex]
if (this.dataForm.id != null && this.dataForm.id !== 0) {
this.routingOperationId = row.technologyRoutingOperationId
this.moRoutingOperationId = row.id
--
Gitblit v1.9.3