From 363678a54142e62fdd4ca39a0db5c54af1a704dc Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 29 二月 2024 15:39:59 +0800
Subject: [PATCH] 生产调度修改

---
 src/api/plan/customerOrderInterrelated.js                  |    5 
 src/views/quality/processconfiguration/index.vue           |    5 
 src/views/plan/customerorder/index.vue                     |   19 +
 src/const/crud/customerOrder/customerOrderForm.js          |    5 
 src/api/quality/rawMaterial.js                             |    5 
 src/views/plan/productionschedul/index.vue                 |  239 +++++++++++++++----------
 src/views/quality/packageinspect/index.vue                 |    9 
 src/views/quality/rawMaterial/rawMaterial-form.vue         |   64 ++++---
 src/api/plan/productionschedul.js                          |    2 
 src/api/plan/customerorder.js                              |    7 
 src/views/plan/customerorder/sample-customerorder-form.vue |  120 +++++++++----
 src/views/quality/processInspect/index.vue                 |    6 
 src/api/plan/customer.js                                   |    4 
 src/views/quality/rawMaterial/index.vue                    |   25 +-
 14 files changed, 313 insertions(+), 202 deletions(-)

diff --git a/src/api/plan/customer.js b/src/api/plan/customer.js
index 0811ecf..3cd2ab4 100644
--- a/src/api/plan/customer.js
+++ b/src/api/plan/customer.js
@@ -25,9 +25,9 @@
   })
 }
 
-export function addObj(obj) {
+export function saveOrUpdate(obj) {
   return request({
-    url: '/mes/customer',
+    url: '/mes/customer/saveOrUpdate',
     method: 'post',
     data: obj
   })
diff --git a/src/api/plan/customerOrderInterrelated.js b/src/api/plan/customerOrderInterrelated.js
index 7ce04ff..6efb71d 100644
--- a/src/api/plan/customerOrderInterrelated.js
+++ b/src/api/plan/customerOrderInterrelated.js
@@ -15,10 +15,11 @@
   })
 }
 
-export function checkHanderOrder(orderId) {
+export function checkHanderOrder(data) {
     return request({
-      url: '/mes/customerOrderInterrelated/checkHanderOrder/' + orderId,
+      url: '/mes/customerOrderInterrelated/checkHanderOrder',
       method: 'post',
+      data: data
     })
   }
 
diff --git a/src/api/plan/customerorder.js b/src/api/plan/customerorder.js
index 452c5aa..11cbee6 100644
--- a/src/api/plan/customerorder.js
+++ b/src/api/plan/customerorder.js
@@ -8,6 +8,13 @@
   })
 }
 
+export function getCustomerMainAndOrderBycNo(contractNo) {
+  return request({
+    url: '/mes/plan/customerOrder/getCustomerMainAndOrderBycNo/' + contractNo,
+    method: 'get',
+  })
+}
+
 export function addCustomerOrder(obj) {
   return request({
     url: '/mes/plan/customerOrder',
diff --git a/src/api/plan/productionschedul.js b/src/api/plan/productionschedul.js
index 55a0947..14363dd 100644
--- a/src/api/plan/productionschedul.js
+++ b/src/api/plan/productionschedul.js
@@ -52,4 +52,4 @@
     method: 'post',
     data: data
   })
-}
\ No newline at end of file
+}
diff --git a/src/api/quality/rawMaterial.js b/src/api/quality/rawMaterial.js
index 65279b7..63affd8 100644
--- a/src/api/quality/rawMaterial.js
+++ b/src/api/quality/rawMaterial.js
@@ -8,11 +8,10 @@
   })
 }
 
-export function checkPutIFS(id,data) {
+export function checkPutIFS(id,result) {
   return request({
-    url: '/mes/rawInspect/check/'+id,
+    url: '/mes/rawInspect/check/'+id+'/'+result,
     method: 'post',
-    data: data
   })
 }
 
diff --git a/src/const/crud/customerOrder/customerOrderForm.js b/src/const/crud/customerOrder/customerOrderForm.js
index 9fda846..7afff6c 100644
--- a/src/const/crud/customerOrder/customerOrderForm.js
+++ b/src/const/crud/customerOrder/customerOrderForm.js
@@ -31,6 +31,9 @@
   refreshBtn: false, // 鏄惁鏄剧ず鍒锋柊鎸夐挳
   columnBtn: false, // 鏄惁鏄剧ず鏄惧奖鎸夐挳H
   column: [{
+    prop: 'id',
+    hide:true
+  },{
     label: '闆朵欢鍙�',
     slot: true,
     formSlot: true,
@@ -44,7 +47,7 @@
     cell: true,
     type: 'input',
     minWidth: 200,
-    span: 24
+    span: 24,
   }, {
     label: '瑙勬牸鍨嬪彿',
     prop: 'customerPartSpec',
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index e69e1ae..1e5ebda 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -949,7 +949,7 @@
           cancelButtonText: '鍙栨秷',
           type: 'warning'
         }).then(() => {
-            checkHanderOrder(val.id).then(res=>{
+            checkHanderOrder(val).then(res=>{
             if(res.status===200){
                 this.$message.success("瀹℃牳閫氳繃")
                 this.getData()
@@ -1106,16 +1106,23 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(row ? row.id : row)
-      })
+      if(row.isPass){
+        this.addOrUpdateVisible = true
+        this.$nextTick(() => {
+            this.$refs.addOrUpdate.init(row ? row.id : row)
+        })
+      }else{
+        this.addSampleVisible = true
+        this.$nextTick(() => {
+            this.$refs.addSampleForm.init(row ? row.contractNo : null)
+        })
+      }
     },
     // 鏂板鏍峰搧璁㈠崟
     addSampleCustomerOrder() {
       this.addSampleVisible = true
       this.$nextTick(() => {
-        this.$refs.addSampleForm.init(0)
+        this.$refs.addSampleForm.init(null)
       })
     },
     // 鎵撳紑鏃ユ湡閫夋嫨妗�
diff --git a/src/views/plan/customerorder/sample-customerorder-form.vue b/src/views/plan/customerorder/sample-customerorder-form.vue
index 8b895f7..262d1fc 100644
--- a/src/views/plan/customerorder/sample-customerorder-form.vue
+++ b/src/views/plan/customerorder/sample-customerorder-form.vue
@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     width="75%"
-    top="10vh"
+    top="5vh"
     :fullscreen="isFullScreen"
     :close-on-click-modal="false"
     :visible.sync="visible"
@@ -230,7 +230,8 @@
 }
 </style>
 <script>
-import { addObj } from '@/api/plan/customer'
+import { saveOrUpdate } from '@/api/plan/customer'
+import { getCustomerMainAndOrderBycNo } from '@/api/plan/customerorder'
 import { remote } from '@/api/admin/dict'
 import PartDialog from '@/views/common/part.vue'
 import {dateFormat} from '@/util/date'
@@ -267,18 +268,19 @@
       currentSelectRow: 0,
       option: tableOption,
       tableData: [{
-          "$cellEdit": true,
-          "$index": 0,
-          "partNo": "",
-          "customerPartSpec": "",
-          "manufactureAttr": "",
-          "productName": "",
-          "productType": "",
-          "otcUnit": "",
-          "buyQtyDue": "",
-          "shippingAddress": "",
-          "remark": "",
-          "isTrusted": true
+          id: null,
+          $cellEdit: true,
+          $index: 0,
+          partNo: "",
+          customerPartSpec: "",
+          manufactureAttr: "",
+          productName: "",
+          productType: "",
+          otcUnit: "",
+          buyQtyDue: "",
+          shippingAddress: "",
+          remark: "",
+          isTrusted: true
       }],
       staffOptions: [],
       title: '',
@@ -287,6 +289,7 @@
       buttonDisable: false,
       showPart: false,
       dataForm: {
+        id: null,
         contractNo: null,
         customerName: null,
         customerNo: null,
@@ -327,12 +330,46 @@
         this.staffOptions = response.data.data
       })
     },
-    init(id) {
-      this.initDataForm()
-      this.visible = true
-      this.$nextTick(() => {
-        this.title = '鏂板'
-      })
+    init(contractNo) {
+      if(contractNo){
+        getCustomerMainAndOrderBycNo(contractNo).then(res=>{
+            if(res.status===200){
+                let data = res.data.data
+                this.dataForm.id = data.id
+                this.dataForm.contractNo = data.contractNo
+                this.dataForm.customerName = data.customerName
+                this.dataForm.entityName = data.entityName
+                this.dataForm.province = data.province
+                this.salesSelectData = data.salesMan
+                this.dataForm.salesMan = data.salesMan
+                this.dataForm.originalContractStatus = data.originalContractStatus
+                this.dataForm.isCp = data.isCp
+                this.dataForm.customerNo = data.customerNo
+                this.dataForm.returnStatus = data.returnStatus
+                this.dataForm.placeOrderDate = data.placeOrderDate
+                this.dataForm.factoryPlaceOrderDate = data.factoryPlaceOrderDate
+                this.dataForm.deliveryDate = data.deliveryDate
+                this.dataForm.comment = data.comment
+                data.customerOrderVOList.forEach(e=>{
+                    e.$cellEdit = true
+                })
+                this.tableData = data.customerOrderVOList
+                console.log(this.dataForm);
+            }
+        }).catch(error=>{
+            console.error(error)
+        })
+        this.visible = true
+        this.$nextTick(() => {
+            this.title = '缂栬緫'
+        })
+      }else{
+        this.initDataForm()
+        this.visible = true
+        this.$nextTick(() => {
+            this.title = '鏂板'
+        })
+      }
     },
     initDataForm() {
       this.dataForm.contractNo = null
@@ -349,18 +386,19 @@
       this.dataForm.deliveryDate = null
       this.dataForm.comment = null
       this.dataForm.customerOrderVOList = [{
-          "$cellEdit": true,
-          "$index": 0,
-          "partNo": "",
-          "customerPartSpec": "",
-          "manufactureAttr": "",
-          "productName": "",
-          "productType": "",
-          "otcUnit": "",
-          "buyQtyDue": "",
-          "shippingAddress": "",
-          "remark": "",
-          "isTrusted": true
+          id: null,
+          $cellEdit: true,
+          $index: 0,
+          partNo: "",
+          customerPartSpec: "",
+          manufactureAttr: "",
+          productName: "",
+          productType: "",
+          otcUnit: "",
+          buyQtyDue: "",
+          shippingAddress: "",
+          remark: "",
+          isTrusted: true
       }]
     },
     // 琛ㄥ崟鎻愪氦
@@ -387,12 +425,18 @@
       _than.$refs.dataForm.validate((valid) => {
         if (valid) {
           _than.dataForm.customerOrderVOList = _than.tableData
-          addObj(_than.dataForm).then((data) => {
-              _than.$message.success('娣诲姞鎴愬姛')
-              _than.initDataForm();
-              _than.visible = false
-              _than.buttonDisable = false
-              _than.$emit('refreshDataList', 1)
+          saveOrUpdate(_than.dataForm).then((res) => {
+            if(res.status===200){
+                if(_than.dataForm.id){
+                    _than.$message.success('鏇存柊鎴愬姛')
+                }else{
+                    _than.$message.success('娣诲姞鎴愬姛')
+                }
+                _than.initDataForm();
+                _than.visible = false
+                _than.buttonDisable = false
+                _than.$emit('refreshDataList', 1)
+            }
             }).catch((error) => {
               _than.buttonDisable = false
             })
diff --git a/src/views/plan/productionschedul/index.vue b/src/views/plan/productionschedul/index.vue
index 5030d7e..fb8f678 100644
--- a/src/views/plan/productionschedul/index.vue
+++ b/src/views/plan/productionschedul/index.vue
@@ -2,56 +2,67 @@
   <div class="mod-config">
     <basic-container>
       <el-row>
-        <el-col :span="16" style="height:100vh">
-          <el-row style="height:65%;padding:0px 10px;">
+        <el-col :span="24">
+          <el-row style="padding:0px 10px;">
             <el-col :span="24" style="margin: 0;">
               <div style="display:flex;height:36px;justify-content: space-between;align-items:center;">
-                <div><span style="color:#E84738;font-weight: bold;">鏈畬鎴�</span></div>
                 <div>
-                  <el-button @click="tagFinished" size="mini" round type="success">鏍囪宸插畬鎴�</el-button>
+                    <el-dropdown @command="changeTable">
+                        <span :style="dropdownTitleStyle" class="el-dropdown-link">
+                            {{dropdownTitle}}<i class="el-icon-arrow-down el-icon--right"></i>
+                        </span>
+                        <el-dropdown-menu slot="dropdown">
+                            <el-dropdown-item command="undone">寰呭畬鎴愯皟搴�</el-dropdown-item>
+                            <el-dropdown-item command="done">宸插畬鎴愯皟搴�</el-dropdown-item>
+                        </el-dropdown-menu>
+                    </el-dropdown>
+                </div>
+                <div>
+                  <el-button @click="tagFinished" v-if="showUnDownTable" size="mini" round type="success">鏍囪宸插畬鎴�</el-button>
                   <el-button size="mini" round type="primary"
-                  v-if="permissions.plan_productionschedul_edit_line"
+                  v-if="permissions.plan_productionschedul_edit_line && showUnDownTable"
                   @click="openEditDialog">缂栬緫鏃堕棿绾�</el-button>
                   <el-tooltip content="鍒锋柊">
                     <el-button circle icon="el-icon-refresh" @click="getDataList"></el-button>
                   </el-tooltip>
                 </div>
               </div>
+              <!-- 寰呭畬鎴愯皟搴﹁〃鏍� -->
               <avue-crud
+              v-if="showUnDownTable"
               class="unfinished-crud"
               :data="tableData"
-              ref="crud"
+              ref="unfinished"
               :option="option"
               :span-method="spanMethod"
               @refresh-change="getDataList"
               @current-change="handleCurrentChange"
               @size-change="handleSizeChange"
+              @cell-click="handleClickCell"
               :page="page"
               @selection-change="selectionRow"
               :table-loading="loading">
-              <template #menu="{ row, index }">
-                <el-button
-                v-if="permissions.plan_productionschedul_edit"
-                type="text"
-                icon="el-icon-edit"
-                size="small"
-                @click="editHandle(row, index)">缂栬緫</el-button>
-                <el-button
-                v-if="permissions.plan_productionschedul_del"
-                type="text"
-                icon="el-icon-delete"
-                size="small"
-                @click="deleteHandle(row, index)">鍒犻櫎</el-button>
-              </template>
+                <template slot="product" slot-scope="scope">
+                    <el-link type="primary">{{ scope.row.product }}</el-link>
+                </template>
+                <template #menu="{ row, index }">
+                    <el-button
+                    v-if="permissions.plan_productionschedul_edit"
+                    type="text"
+                    icon="el-icon-edit"
+                    size="small"
+                    @click="editHandle(row, index)">缂栬緫</el-button>
+                    <el-button
+                    v-if="permissions.plan_productionschedul_del"
+                    type="text"
+                    icon="el-icon-delete"
+                    size="small"
+                    @click="deleteHandle(row, index)">鍒犻櫎</el-button>
+                </template>
               </avue-crud>
-            </el-col>
-          </el-row>
-          <el-row style="height:35%;padding:0px 10px;">
-            <el-col :span="24" style="margin: 0;">
-              <div style="display:flex;height:36px;justify-content: space-between;align-items:center;">
-                <div><span style="color:#34BD66;font-weight: bold;">宸插畬鎴�</span></div>
-              </div>
+              <!-- 宸插畬鎴愯皟搴﹁〃鏍� -->
               <avue-crud
+              v-else
               class="finished-crud"
               :data="finishedTableData"
               ref="finished"
@@ -59,45 +70,20 @@
               :span-method="spanMethod"
               @refresh-change="getFinishedData"
               @current-change="handleCurrentChange"
+              @cell-click="handleClickCell"
               @size-change="handleSizeChange"
               :page="finishedPage"
               @selection-change="selectionFinishedRow">
+                <template slot="product" slot-scope="scope">
+                    <el-link type="primary">{{ scope.row.product }}</el-link>
+                </template>
               </avue-crud>
             </el-col>
           </el-row>
         </el-col>
-        <el-col :span="8" style="padding-left: 10px">
-          <div style="">
-            <el-card>
-              <div slot="header" class="clearfix">
-                <span>璋冨害鏃堕棿绾�</span>
-              </div>
-              <div style="height:100vh;overflow-y: scroll;">
-                <el-timeline>
-                    <el-timeline-item
-                      placement="top"
-                      :color="(item.planTime||item.actualTime) ? '#34BD66' :null"
-                      :icon="(item.planTime||item.actualTime) ? 'el-icon-circle-check' :null"
-                      v-for="(item, index) in scheduleList"
-                      :key="index"
-                      :timestamp="item.title">
-                        <el-card shadow="hover" :body-style="{margin: '0',padding:'0px 20px 0px 20px'}" style="width:90%;">
-                          <p>
-                            <span style="font-weight: bold;">璁″垝鏃堕棿: </span>
-                            {{item.planTime}}
-                          </p>
-                          <p>
-                            <span style="font-weight: bold;">瀹為檯鏃堕棿: </span>
-                            {{ item.actualTime }}</p>
-                        </el-card>
-                    </el-timeline-item>
-                </el-timeline>
-            </div>
-            </el-card>
-          </div>
-        </el-col>
       </el-row>
     </basic-container>
+    <!-- 缂栬緫鏃堕棿绾� -->
     <el-dialog
     title="缂栬緫鏃堕棿绾�"
     :visible.sync="dialogVisible"
@@ -147,32 +133,63 @@
         <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="confirmEditSchedul">纭� 瀹�</el-button>
       </span>
-  </el-dialog>
-  <el-dialog
-    title="缂栬緫"
-    :visible.sync="editDialogVisible"
-    width="50%">
-    <el-form :model="editForm" label-width="120px">
-      <el-row>
-        <el-col :span="24">
-          <el-form-item label="鐢熶骇鎯呭喌:">
-            <el-input style="width:100%" placeholder="璇疯緭鍏ョ敓浜ф儏鍐�" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input>
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="24">
-          <el-form-item label="鐢熶骇绋嬪害:">
-            <el-input style="width:100%" placeholder="璇疯緭鍏ョ敓浜х▼搴�" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input>
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="editDialogVisible = false">鍙� 娑�</el-button>
-      <el-button type="primary" @click="confirmEdit()">纭� 瀹�</el-button>
-    </span>
-  </el-dialog>
+    </el-dialog>
+    <!-- 缂栬緫鐢熶骇杩囩▼鍜岀敓浜ф儏鍐� -->
+    <el-dialog
+        title="缂栬緫"
+        :visible.sync="editDialogVisible"
+        width="50%">
+        <el-form :model="editForm" label-width="120px">
+        <el-row>
+            <el-col :span="24">
+            <el-form-item label="鐢熶骇鎯呭喌:">
+                <el-input style="width:100%" placeholder="璇疯緭鍏ョ敓浜ф儏鍐�" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input>
+            </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="24">
+            <el-form-item label="鐢熶骇绋嬪害:">
+                <el-input style="width:100%" placeholder="璇疯緭鍏ョ敓浜х▼搴�" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input>
+            </el-form-item>
+            </el-col>
+        </el-row>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+        <el-button @click="editDialogVisible = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="confirmEdit()">纭� 瀹�</el-button>
+        </span>
+    </el-dialog>
+    <!-- 鏌ョ湅鏃堕棿绾� -->
+    <el-dialog
+    title="鏌ョ湅璋冨害鏃堕棿绾�"
+    top="5vh"
+    :visible.sync="showTimeLineDialog"
+    width="40%">
+        <el-card>
+            <div style="height:500px;overflow-y: scroll;">
+            <el-timeline>
+                <el-timeline-item
+                    placement="top"
+                    :color="(item.actualTime) ? '#34BD66' :null"
+                    :icon="(item.actualTime) ? 'el-icon-circle-check' :null"
+                    v-for="(item, index) in scheduleList"
+                    :key="index"
+                    :timestamp="item.title">
+                    <el-card shadow="hover" :body-style="{margin: '0',padding:'0px 20px 0px 20px'}" style="width:90%;">
+                        <p>
+                        <span style="font-weight: bold;">璁″垝鏃堕棿: </span>
+                        {{item.planTime}}
+                        </p>
+                        <p>
+                        <span style="font-weight: bold;">瀹為檯鏃堕棿: </span>
+                        {{ item.actualTime }}</p>
+                    </el-card>
+                </el-timeline-item>
+            </el-timeline>
+            </div>
+        </el-card>
+    </el-dialog>
   </div>
 </template>
 
@@ -184,12 +201,20 @@
   deleteSchedul,
   updateState,
   checkTimeLines,
+  updateSchedul
 } from '@/api//plan/productionschedul'
 import ttable from '@/views/common/ztt-table.vue'
 import { mapGetters } from 'vuex'
 export default {
     data() {
     return {
+      dropdownTitleStyle: {
+        color: '#E84738',
+        fontWeight: 'bold'
+      },
+      showUnDownTable: true,
+      dropdownTitle: '寰呭畬鎴愯皟搴�',
+      showTimeLineDialog:false,
       editForm:{
         id: null,
         productionRoutine: null,
@@ -221,7 +246,7 @@
           prop:'id',
           order:'descending'
         },
-        height: 370,
+        height: 530,
         selection: true,
         columnBtn: false,
         index: true,
@@ -280,6 +305,7 @@
             prop: 'product',
             label: '浜у搧鍚�',
             overHidden: true,
+            slot: true
           },
           {
             minWidth: 120,
@@ -391,6 +417,7 @@
             prop: 'product',
             label: '浜у搧鍚�',
             overHidden: true,
+            slot: true
           },
           {
             minWidth: 120,
@@ -502,12 +529,26 @@
       }
     }
   },
-  mounted() {
-
-  },
-  beforeDestroy() {
-  },
+  mounted() {},
+  beforeDestroy() {},
   methods: {
+    handleClickCell(row, column, cell, event){
+        if(column.label === '浜у搧鍚�'){
+            this.getScheduleById(row.mid)
+            this.showTimeLineDialog = true
+        }
+    },
+    changeTable(command){
+        if(command === 'undone'){
+            this.dropdownTitle = '寰呭畬鎴愯皟搴�'
+            this.dropdownTitleStyle = {color:'#E84738',fontWeight: 'bold'}
+            this.showUnDownTable = true
+        }else if(command === 'done'){
+            this.dropdownTitle = '宸插畬鎴愯皟搴�'
+            this.dropdownTitleStyle = {color:'#34BD66',fontWeight: 'bold'}
+            this.showUnDownTable = false
+        }
+    },
     tagFinished(){
       if(this.multipleSelection.length < 1){
         this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�")
@@ -567,6 +608,7 @@
       })
     },
     confirmEditSchedul(){
+      const _than = this
       let data = this.scheduleEditList
       let mIds = this.multipleSelection.map(ele=>{
         return ele.mid
@@ -588,16 +630,15 @@
       }
       fillTime(obj).then(res=>{
         if(res.status===200){
-          this.$message.success("鏇存柊鎴愬姛")
+            _than.$message.success("鏇存柊鎴愬姛")
         }else{
-          this.$message.error("鏇存柊澶辫触")
+            _than.$message.error("鏇存柊澶辫触")
         }
-        this.getScheduleById(orderObj.id)
-        this.dialogVisible = false
+        // _than.getScheduleById(orderObj.id)
+        _than.dialogVisible = false
       }).catch(error=>{
         console.error(error);
       })
-
     },
     initTimeLine(data){
       let scheduleList = []
@@ -649,7 +690,10 @@
     },
     selectionRow(val){
       this.multipleSelection = val
-      this.getScheduleById(val[val.length-1].mid)
+    //   if(this.multipleSelection.length>0){
+    //       this.getScheduleById(val[val.length-1].mid)
+    //       this.showTimeLineDialog = true
+    //   }
     },
     selectionFinishedRow(val){
       if (val.length > 1) {
@@ -686,6 +730,9 @@
     getDataList(){
       this.getUnFinishedData()
       this.getFinishedData()
+      this.$nextTick(()=>{
+          this.rowCalc()
+      })
     },
     getUnFinishedData() {
       this.loading = true
@@ -728,7 +775,7 @@
         deleteSchedul(row.mid).then(res=>{
           if(res.status===200){
             _than.$message.success("鍒犻櫎鎴愬姛")
-            _than.getData()
+            _than.getDataList()
           }
         }).catch(error=>{
           console.error(error)
diff --git a/src/views/quality/packageinspect/index.vue b/src/views/quality/packageinspect/index.vue
index e8a924d..e6093cd 100644
--- a/src/views/quality/packageinspect/index.vue
+++ b/src/views/quality/packageinspect/index.vue
@@ -17,7 +17,7 @@
   <template>
     <div class="mod-config">
         <basic-container>
-            <ttable 
+            <ttable
             :table="table"
             :resultData="resultData"
             @handleSelectionChange="handleSelectionChange"
@@ -121,7 +121,7 @@
                         isTrue: true,
                         sort: true,
                         isSearch: true,
-                        searchInfoType: 'text',
+                        searchInfoType: 'date',
                         formatter: this.formatDateTime,
                     },
                     {
@@ -155,7 +155,7 @@
     components: {
         ttable,
     },
-    created() { 
+    created() {
         if(this.permissions.quality_packageinspect_del){
             this.table.operator = [{
                     text: '浣滃簾',
@@ -202,7 +202,7 @@
             }
             this.$router.push({
                 name: 'packageInspectForm',
-                query: { 
+                query: {
                     id: row == null ? null : row.id
                  },
                  params:{resultVal : row.result=='' ? null : row.result}
@@ -229,4 +229,3 @@
     }
   }
   </script>
-  
\ No newline at end of file
diff --git a/src/views/quality/processInspect/index.vue b/src/views/quality/processInspect/index.vue
index 5e630a0..210b8f1 100644
--- a/src/views/quality/processInspect/index.vue
+++ b/src/views/quality/processInspect/index.vue
@@ -2,7 +2,7 @@
 	<div class="content-main">
 		<div class="rawPage">
             <basic-container>
-                <ttable 
+                <ttable
                 :table="table"
                 @handleSelectionChange="handleSelectionChange"
                 :prelang="prelang"
@@ -176,7 +176,7 @@
         computed: {
             ...mapGetters(['permissions'])
         },
-		created() { 
+		created() {
             if(this.permissions.quality_processInspect_add){
                 this.table.toolbar.push({
                         text: '鏂板',
@@ -329,4 +329,4 @@
 	.rawPage .content-body {
 		flex: 1;
 	}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/quality/processconfiguration/index.vue b/src/views/quality/processconfiguration/index.vue
index 84e9848..11b510d 100644
--- a/src/views/quality/processconfiguration/index.vue
+++ b/src/views/quality/processconfiguration/index.vue
@@ -323,10 +323,7 @@
             type: 'text',
             size: 'small',
             fun: this.AuditResult,
-            show: {
-                key: 'type',
-                val: ['杩囩▼妫�楠�','浜у搧妫�楠�','鍖呰妫�楠�']
-            }
+            showFun: (row)=>{return row.type != '鍘熸潗鏂欐楠�'}
           })
     }
     this.table.operator = arr.length>0 ? arr : null
diff --git a/src/views/quality/rawMaterial/index.vue b/src/views/quality/rawMaterial/index.vue
index fc085ef..3e3b81e 100644
--- a/src/views/quality/rawMaterial/index.vue
+++ b/src/views/quality/rawMaterial/index.vue
@@ -317,25 +317,22 @@
                 cancelButtonText: '涓嶉�氳繃',
                 type: 'warning'
             }).then(() => {
-                checkPutIFS(val.id,{result: 1}).then(res=>{
-                    if(res.status===200){
-                        console.log(res)
-                    }
-                }).catch(error=>{
-                    console.error(error)
-                })
+                this.checkPutIFSFun(val.id,1);
             }).catch((action) => {
                 if(action === 'cancel'){
-                    checkPutIFS(val.id,{result: 2}).then(res=>{
-                        if(res.status===200){
-                            console.log(res)
-                        }
-                    }).catch(error=>{
-                        console.error(error)
-                    })
+                    this.checkPutIFSFun(val.id,2);
                 }
             });
         },
+        checkPutIFSFun(id,result){
+            checkPutIFS(id, result).then(res=>{
+                if(res.status===200){
+                    this.getData()
+                }
+            }).catch(error=>{
+                console.error(error)
+            })
+        },
         downloadReport(){
             let selection = this.multipleSelection
             if(!selection || selection.length < 1){
diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue
index 2e2a60c..89e79b8 100644
--- a/src/views/quality/rawMaterial/rawMaterial-form.vue
+++ b/src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -92,21 +92,26 @@
             </el-row>
             <el-row>
                 <el-col :span="6">
+                    <el-form-item label="鎶ユ鏃ユ湡" prop="createTime">
+                        <el-date-picker
+                        :disabled="dataForm.id!=null"
+                        v-model="dataForm.createTime"
+                        type="datetime"
+                        placeholder="鎶ユ鏃ユ湡">
+                        </el-date-picker>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="鎶ユ浜�" prop="createUser" v-if="dataForm.id!=null">
+                        <el-input v-model="dataForm.createUser" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
                   <el-form-item  prop="projectName" label="椤圭洰鍚嶇О" v-if="dataForm.id!=null">
                     <el-tooltip :disabled="dataForm.projectName==null" :content="dataForm.projectName">
                       <el-input v-model="dataForm.projectName" disabled ></el-input>
                     </el-tooltip>
                   </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                  <el-form-item label="鎶ユ鏃ユ湡" prop="createTime" v-if="dataForm.id!=null">
-                      <el-input v-model="dataForm.createTime" disabled />
-                  </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="鎶ユ浜�" prop="createUser" v-if="dataForm.id!=null">
-                      <el-input v-model="dataForm.createUser" disabled />
-                </el-form-item>
               </el-col>
             </el-row>
         </el-form>
@@ -480,7 +485,8 @@
               testState: ''
             }],
             dataRule: {
-              code:[{ required: true, message: '璇锋壂鎻忛�夋嫨闆朵欢', trigger: 'blur' }]
+              code:[{ required: true, message: '璇锋壂鎻忛�夋嫨闆朵欢', trigger: 'blur' }],
+              createTime: [{ required: true, message: '璇烽�夋嫨鎶ユ鏃ユ湡', trigger: 'change' }]
             },
             deviceList: [],
         }
@@ -965,22 +971,26 @@
         row.children.push(obj)
       },
       save(){
-        const _than = this
-        let data = this.dataForm
-        this.list.forEach(item=>{
-          item.children.forEach(c=>{
-            c.testValue=c.testValueList.join(",")
-          })
-        })
-        data.rawInsProducts = this.list
-        addRawInspects(data).then(res=>{
-            this.$message.success("淇濆瓨鎴愬姛")
-            // this.$router.go(-1)
-        }).catch(error=>{
-          this.$message.error(error)
-        })
-        _than.$nextTick(()=>{
-            _than.init(Number(res.data.msg))
+        this.$refs.dataForm.validate(valid=>{
+            if(valid){
+                const _than = this
+                let data = this.dataForm
+                this.list.forEach(item=>{
+                item.children.forEach(c=>{
+                    c.testValue=c.testValueList.join(",")
+                })
+                })
+                data.rawInsProducts = this.list
+                addRawInspects(data).then(res=>{
+                    this.$message.success("淇濆瓨鎴愬姛")
+                    // this.$router.go(-1)
+                }).catch(error=>{
+                this.$message.error(error)
+                })
+                _than.$nextTick(()=>{
+                    _than.init(Number(res.data.msg))
+                })
+            }
         })
       },
       getDeviceList(){

--
Gitblit v1.9.3