From c0849bd605b1399aabf51add2c04c775e3c7cbea Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 11 十月 2023 15:26:54 +0800
Subject: [PATCH] 	new file:   src/api/admin/productType.js 	new file:   src/const/crud/admin/productType.js 	modified:   src/const/crud/admin/user.js 	modified:   src/page/index/logo.vue 	new file:   src/views/admin/productType/index.vue 	modified:   src/views/plan/customerorder/customerorder-form.vue 	modified:   src/views/plan/customerorder/index.vue 	modified:   src/views/plan/manufacturingorder/index.vue 	modified:   src/views/plan/masterproductionschedule/index.vue 	modified:   vue.config.js

---
 src/views/plan/customerorder/index.vue |  146 ++++++++++++++++++++++++++----------------------
 1 files changed, 80 insertions(+), 66 deletions(-)

diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 1810399..c061cf7 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -23,9 +23,9 @@
               <el-dropdown-item
                 :command="item.command"
                 v-for="item in stateTagArr"
-                :disabled="item.disabled"
-                >{{ item.label }}</el-dropdown-item
-              >
+                :disabled="item.disabled">
+                {{ item.label }}
+              </el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
           <el-dropdown
@@ -64,13 +64,13 @@
               >
             </el-dropdown-menu>
           </el-dropdown>
-          <el-button
+          <!-- <el-button
             v-if="permissions.customerorder_push_otc"
             style="margin-left:10px;"
             type="primary"
             @click="pushOtc"
             >鎺ㄩ�丒RP</el-button
-          >
+          > -->
           <el-button
             style="margin-left:10px;"
             type="primary"
@@ -240,18 +240,18 @@
       </el-dialog>
     </basic-container>
 
-    <el-dialog title="閫夋嫨鍚屾鏃ユ湡" :visible.sync="syncDateVisible" width="30%">
+    <el-dialog title="閫夋嫨鍚屾鏃ユ湡" :visible.sync="syncDateVisible" width="20%">
       <div style="display: flex;justify-content: center">
-        <el-date-picker
-          v-model="syncDate"
-          type="daterange"
-          value-format="yyyy-MM-dd"
-          range-separator="鑷�"
-          start-placeholder="寮�濮嬫棩鏈�"
-          end-placeholder="缁撴潫鏃ユ湡"
-          :picker-options="pickerOptions"
-        >
-        </el-date-picker>
+        <el-form :model="dataForm" :inline="true" :rules="dataRule" ref="dataForm" class="l-mes">
+          <el-form-item label="鏃ユ湡">
+            <el-date-picker
+              v-model="dataForm.selectTime"
+              type="datetime"
+              placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+              value-format="yyyy-MM-dd HH:mm:ss">
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="syncDateVisible = false">鍙� 娑�</el-button>
@@ -273,6 +273,7 @@
 import MpsRequirements from './mps-requirements'
 import SalesPartBatchDialog from './sales-part-batch.vue'
 import CustomerorderReturnDialog from './customerorder-return.vue'
+import { otcCustomerOrderSync } from '@/api/plan/customerorder'
 import {
   delCustomerOrder,
   fetchListCustomerOrder,
@@ -300,6 +301,10 @@
 export default {
   data() {
     return {
+      dataForm: {
+        selectTime: null
+      },
+      dataRule: {},
       pickerOptions: {
         onPick: ({ maxDate, minDate }) => {
           if (minDate && this.pickerMinDate) {
@@ -1006,24 +1011,24 @@
         ],
         toolbar: [],
         operator: [
-          {
-            text: '璁㈠崟璇存槑',
-            type: 'text',
-            size: 'small',
-            fun: this.openCustomerOrder
-          },
-          {
-            text: '鏌ョ湅搴撳瓨',
-            type: 'text',
-            size: 'small',
-            fun: this.stockHandle
-          },
-          {
-            text: '绠辩爜淇℃伅瀵煎嚭',
-            type: 'text',
-            size: 'small',
-            fun: this.packageExportHandle
-          },
+          // {
+          //   text: '璁㈠崟璇存槑',
+          //   type: 'text',
+          //   size: 'small',
+          //   fun: this.openCustomerOrder
+          // },
+          // {
+          //   text: '鏌ョ湅搴撳瓨',
+          //   type: 'text',
+          //   size: 'small',
+          //   fun: this.stockHandle
+          // },
+          // {
+          //   text: '绠辩爜淇℃伅瀵煎嚭',
+          //   type: 'text',
+          //   size: 'small',
+          //   fun: this.packageExportHandle
+          // },
           {
             text: '浣滃簾',
             type: 'text',
@@ -1222,16 +1227,16 @@
         permitArr: []
       })
     }
-    if (this.permissions.customerorder_ifs_line) {
-      this.table.toolbar.push({
-        text: '鑾峰彇ERP琛屽彿',
-        type: 'primary',
-        fun: this.pullIfsLineNo,
-        disabled: false,
-        permitArr: [],
-        loading: false
-      })
-    }
+    // if (this.permissions.customerorder_ifs_line) {
+    //   this.table.toolbar.push({
+    //     text: '鑾峰彇ERP琛屽彿',
+    //     type: 'primary',
+    //     fun: this.pullIfsLineNo,
+    //     disabled: false,
+    //     permitArr: [],
+    //     loading: false
+    //   })
+    // }
     if (this.permissions.customerorder_submit_oa) {
       this.table.toolbar.push({
         text: '鎻愪氦瀹℃牳',
@@ -1269,7 +1274,7 @@
           prop: 'coState',
           searchInfoType: 'select',
           // propVal: '01partUnCheck'
-          propVal: '02technologyUnCheck'
+          // propVal: '02technologyUnCheck'
         })
       )
       this.$refs.customerOrderTable.setQueryParam(queryParam)
@@ -1942,28 +1947,37 @@
       this.syncDateVisible = false
       this.table.toolbar.find((e) => e.text === '鑾峰彇閿�鍞鍗�').loading = true
 
-      syncOrder({
-        startTime: this.syncDate[0],
-        endTime: this.syncDate[1]
-      })
-        .then((res) => {
-          this.table.toolbar.find(
-            (e) => e.text === '鑾峰彇閿�鍞鍗�'
-          ).loading = false
-          const resData = res.data
-          if (resData.code === 0) {
-            this.$message.success(resData.data)
-            this.getData()
-          } else {
-            this.$message.error('鍚屾澶辫触')
-          }
+      if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') {
+        otcCustomerOrderSync({
+          selectTime: this.dataForm.selectTime,
+          pathCode: '1'
         })
-        .catch((e) => {
-          this.table.toolbar.find(
-            (e) => e.text === '鑾峰彇閿�鍞鍗�'
-          ).loading = false
-          this.$forceUpdate()
-        })
+          .then((response) => {
+            this.table.toolbar.find(
+              (e) => e.text === '鑾峰彇閿�鍞鍗�'
+            ).loading = false
+            const resData = response.data
+            if (resData.code === 0) {
+              this.$message.success('鎷夊彇閿�鍞鍗曟垚鍔燂紱' + resData.msg)
+              this.dataForm.selectTime = null
+              this.$emit('refreshDataList')
+              this.getData()
+            } else {
+              this.$message.success('鎷夊彇閿�鍞鍗曞け璐�')
+            }
+          })
+          .catch((e) => {
+            this.table.toolbar.find(
+              (e) => e.text === '鑾峰彇閿�鍞鍗�'
+            ).loading = false
+            this.$forceUpdate()
+          })
+      } else {
+        this.table.toolbar.find(
+          (e) => e.text === '鑾峰彇閿�鍞鍗�'
+        ).loading = false
+        this.$message.error('璇峰厛閫夋嫨鏃ユ湡')
+      }
     }
   }
 }

--
Gitblit v1.9.3