From 3cbfbac2def7eba8a8a7f07aa0ec4426799e8d2a Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期六, 16 八月 2025 16:24:42 +0800
Subject: [PATCH] art: 物料拉动相关代码修改

---
 src/views/mes/modules/MesMaterialTransferRequestForm.vue |   84 +++++++-------
 src/views/mes/MesMaterialTransferRequestList.vue         |  259 +++++++++++++++++--------------------------
 2 files changed, 144 insertions(+), 199 deletions(-)

diff --git a/src/views/mes/MesMaterialTransferRequestList.vue b/src/views/mes/MesMaterialTransferRequestList.vue
index b370b82..c2242c4 100644
--- a/src/views/mes/MesMaterialTransferRequestList.vue
+++ b/src/views/mes/MesMaterialTransferRequestList.vue
@@ -12,24 +12,24 @@
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('鐗╂枡鎷夊姩鐢宠')">瀵煎嚭</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">瀵煎叆</a-button>
-      </a-upload>
-      <!-- 楂樼骇鏌ヨ鍖哄煙 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
+          <a-menu-item key="1" @click="batchDel">
+            <a-icon type="delete" />
+            鍒犻櫎
+          </a-menu-item>
         </a-menu>
-        <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button>
+        <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
+          <a-icon type="down" />
+        </a-button>
       </a-dropdown>
     </div>
 
     <!-- table鍖哄煙-begin -->
     <div>
       <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a
+        style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
         <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
       </div>
 
@@ -46,27 +46,6 @@
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         class="j-table-force-nowrap"
         @change="handleTableChange">
-
-        <template slot="htmlSlot" slot-scope="text">
-          <div v-html="text"></div>
-        </template>
-        <template slot="imgSlot" slot-scope="text,record">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
-          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
-        </template>
-        <template slot="fileSlot" slot-scope="text">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
-          <a-button
-            v-else
-            :ghost="true"
-            type="primary"
-            icon="download"
-            size="small"
-            @click="downloadFile(text)">
-            涓嬭浇
-          </a-button>
-        </template>
-
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">缂栬緫</a>
 
@@ -95,138 +74,104 @@
 
 <script>
 
-  import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import MesMaterialTransferRequestModal from './modules/MesMaterialTransferRequestModal'
-  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import MesMaterialTransferRequestModal from './modules/MesMaterialTransferRequestModal'
 
-  export default {
-    name: 'MesMaterialTransferRequestList',
-    mixins:[JeecgListMixin, mixinDevice],
-    components: {
-      MesMaterialTransferRequestModal
-    },
-    data () {
-      return {
-        description: '鐗╂枡鎷夊姩鐢宠绠$悊椤甸潰',
-        // 琛ㄥご
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },
-          {
-            title:'鍒犻櫎鏍囪',
-            align:"center",
-            dataIndex: 'delFlag'
-          },
-          {
-            title:'鎷夊姩鍗曞彿',
-            align:"center",
-            dataIndex: 'requestCode'
-          },
-          {
-            title:'宸ュ崟ID',
-            align:"center",
-            dataIndex: 'workOrderId'
-          },
-          {
-            title:'SAP棰勭暀鍙�',
-            align:"center",
-            dataIndex: 'reservationCode'
-          },
-          {
-            title:'鍙戝竷鐘舵��',
-            align:"center",
-            dataIndex: 'publishStatus_dictText'
-          },
-          {
-            title:'璇锋眰鐘舵��',
-            align:"center",
-            dataIndex: 'requestStatus_dictText'
-          },
-          {
-            title:'璇锋眰鏃堕棿',
-            align:"center",
-            dataIndex: 'requestTime'
-          },
-          {
-            title:'鍘熷簱瀛樺湴',
-            align:"center",
-            dataIndex: 'originalWarehouseId'
-          },
-          {
-            title:'鐩爣搴撳瓨鍦�',
-            align:"center",
-            dataIndex: 'targetWarehouseId'
-          },
-          {
-            title:'浼樺厛绾э紙鎷夊姩绫诲瀷锛�',
-            align:"center",
-            dataIndex: 'priority_dictText'
-          },
-          {
-            title:'鏈�鏅氶厤閫佹椂闂�',
-            align:"center",
-            dataIndex: 'latestDeliveryTime'
-          },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align:"center",
-            fixed:"right",
-            width:147,
-            scopedSlots: { customRender: 'action' }
+export default {
+  name: 'MesMaterialTransferRequestList',
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    MesMaterialTransferRequestModal
+  },
+  data() {
+    return {
+      description: '鐗╂枡鎷夊姩鐢宠绠$悊椤甸潰',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
           }
-        ],
-        url: {
-          list: "/mesmaterialtransferrequest/mesMaterialTransferRequest/list",
-          delete: "/mesmaterialtransferrequest/mesMaterialTransferRequest/delete",
-          deleteBatch: "/mesmaterialtransferrequest/mesMaterialTransferRequest/deleteBatch",
-          exportXlsUrl: "/mesmaterialtransferrequest/mesMaterialTransferRequest/exportXls",
-          importExcelUrl: "mesmaterialtransferrequest/mesMaterialTransferRequest/importExcel",
-          
         },
-        dictOptions:{},
-        superFieldList:[],
-      }
-    },
-    created() {
-    this.getSuperFieldList();
-    },
-    computed: {
-      importExcelUrl: function(){
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      },
-    },
-    methods: {
-      initDictConfig(){
-      },
-      getSuperFieldList(){
-        let fieldList=[];
-        fieldList.push({type:'int',value:'delFlag',text:'鍒犻櫎鏍囪',dictCode:''})
-        fieldList.push({type:'string',value:'requestCode',text:'鎷夊姩鍗曞彿',dictCode:''})
-        fieldList.push({type:'string',value:'workOrderId',text:'宸ュ崟ID',dictCode:''})
-        fieldList.push({type:'string',value:'reservationCode',text:'SAP棰勭暀鍙�',dictCode:''})
-        fieldList.push({type:'string',value:'publishStatus',text:'鍙戝竷鐘舵��',dictCode:'publish_status'})
-        fieldList.push({type:'string',value:'requestStatus',text:'璇锋眰鐘舵��',dictCode:'request_status'})
-        fieldList.push({type:'datetime',value:'requestTime',text:'璇锋眰鏃堕棿'})
-        fieldList.push({type:'string',value:'originalWarehouseId',text:'鍘熷簱瀛樺湴',dictCode:''})
-        fieldList.push({type:'string',value:'targetWarehouseId',text:'鐩爣搴撳瓨鍦�',dictCode:''})
-        fieldList.push({type:'string',value:'priority',text:'浼樺厛绾э紙鎷夊姩绫诲瀷锛�',dictCode:'priority'})
-        fieldList.push({type:'datetime',value:'latestDeliveryTime',text:'鏈�鏅氶厤閫佹椂闂�'})
-        this.superFieldList = fieldList
+        {
+          title: '鎷夊姩鍗曞彿',
+          align: 'center',
+          dataIndex: 'requestCode'
+        },
+        {
+          title: '宸ュ崟ID',
+          align: 'center',
+          dataIndex: 'workOrderId'
+        },
+        {
+          title: 'SAP棰勭暀鍙�',
+          align: 'center',
+          dataIndex: 'reservationCode'
+        },
+        {
+          title: '鍙戝竷鐘舵��',
+          align: 'center',
+          dataIndex: 'publishStatus_dictText'
+        },
+        {
+          title: '璇锋眰鐘舵��',
+          align: 'center',
+          dataIndex: 'requestStatus_dictText'
+        },
+        {
+          title: '璇锋眰鏃堕棿',
+          align: 'center',
+          dataIndex: 'requestTime'
+        },
+        {
+          title: '鍘熷簱瀛樺湴',
+          align: 'center',
+          dataIndex: 'originalWarehouseId'
+        },
+        {
+          title: '鐩爣搴撳瓨鍦�',
+          align: 'center',
+          dataIndex: 'targetWarehouseId'
+        },
+        {
+          title: '浼樺厛绾э紙鎷夊姩绫诲瀷锛�',
+          align: 'center',
+          dataIndex: 'priority_dictText'
+        },
+        {
+          title: '鏈�鏅氶厤閫佹椂闂�',
+          align: 'center',
+          dataIndex: 'latestDeliveryTime'
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: 'center',
+          fixed: 'right',
+          width: 147,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/mes/mesMaterialTransferRequest/list',
+        delete: '/mes/mesMaterialTransferRequest/delete',
+        deleteBatch: '/mes/mesMaterialTransferRequest/deleteBatch'
       }
     }
-  }
+  },
+  created() {
+  },
+  computed: {},
+  methods: {}
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>
\ No newline at end of file
diff --git a/src/views/mes/modules/MesMaterialTransferRequestForm.vue b/src/views/mes/modules/MesMaterialTransferRequestForm.vue
index 2ec3134..e24608f 100644
--- a/src/views/mes/modules/MesMaterialTransferRequestForm.vue
+++ b/src/views/mes/modules/MesMaterialTransferRequestForm.vue
@@ -4,58 +4,43 @@
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
           <a-col :span="12">
-            <a-form-model-item label="鍒犻櫎鏍囪" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
-              <a-input-number v-model="model.delFlag" placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12">
             <a-form-model-item label="鎷夊姩鍗曞彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="requestCode">
-              <a-input v-model="model.requestCode" placeholder="璇疯緭鍏ユ媺鍔ㄥ崟鍙�"  ></a-input>
+              <a-input v-model="model.requestCode" placeholder="鎷夊姩鍗曞彿鑷姩鐢熸垚" readOnly></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="宸ュ崟ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrderId">
+            <a-form-model-item label="璧峰搴撳瓨鍦扮偣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="originalWarehouseId">
+              <j-dict-select-tag type="list" v-model="model.originalWarehouseId" dictCode="original_warehouse_list" placeholder="璇烽�夋嫨璧峰搴撳瓨鍦扮偣" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="浠诲姟鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrderId">
               <a-input v-model="model.workOrderId" placeholder="璇疯緭鍏ュ伐鍗旾D"  ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="SAP棰勭暀鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reservationCode">
-              <a-input v-model="model.reservationCode" placeholder="璇疯緭鍏AP棰勭暀鍙�"  ></a-input>
+            <a-form-model-item label="鐩爣搴撳瓨鍦扮偣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="targetWarehouseId">
+              <a-input v-model="model.targetWarehouseId" placeholder="鑷姩鑾峰彇" readOnly ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="鍙戝竷鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishStatus">
-              <j-dict-select-tag type="list" v-model="model.publishStatus" dictCode="publish_status" placeholder="璇烽�夋嫨鍙戝竷鐘舵��" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-model-item label="璇锋眰鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="requestStatus">
-              <j-dict-select-tag type="list" v-model="model.requestStatus" dictCode="request_status" placeholder="璇烽�夋嫨璇锋眰鐘舵��" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-model-item label="璇锋眰鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="requestTime">
-              <j-date placeholder="璇烽�夋嫨璇锋眰鏃堕棿"  v-model="model.requestTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-model-item label="鍘熷簱瀛樺湴" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="originalWarehouseId">
-              <a-input v-model="model.originalWarehouseId" placeholder="璇疯緭鍏ュ師搴撳瓨鍦�"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-model-item label="鐩爣搴撳瓨鍦�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="targetWarehouseId">
-              <a-input v-model="model.targetWarehouseId" placeholder="璇疯緭鍏ョ洰鏍囧簱瀛樺湴"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-model-item label="浼樺厛绾э紙鎷夊姩绫诲瀷锛�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priority">
-              <j-dict-select-tag type="list" v-model="model.priority" dictCode="priority" placeholder="璇烽�夋嫨浼樺厛绾э紙鎷夊姩绫诲瀷锛�" />
+            <a-form-model-item label="鎷夊姩绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialTransferCategory">
+              <j-dict-select-tag type="list" v-model="model.materialTransferCategory" dictCode="material_transfer_category" placeholder="璇烽�夋嫨鎷夊姩绫诲瀷" />
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item label="鏈�鏅氶厤閫佹椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="latestDeliveryTime">
-              <j-date placeholder="璇烽�夋嫨鏈�鏅氶厤閫佹椂闂�"  v-model="model.latestDeliveryTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
+              <j-date placeholder="璇烽�夋嫨鏈�鏅氶厤閫佹椂闂�"  v-model="model.latestDeliveryTime" :show-time="false" date-format="YYYY-MM-DD" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="鎷夊姩鐗╂枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber">
+              <j-dict-select-tag type="list" v-model="model.materialNumber" dictCode="priority" placeholder="璇烽�夋嫨鎷夊姩鐗╂枡" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="鎷夊姩鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifiedQuantity">
+              <a-input-number v-model="model.specifiedQuantity" placeholder="璇疯緭鍏ユ媺鍔ㄦ暟閲�" style="width: 100%" />
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -87,7 +72,7 @@
          },
         labelCol: {
           xs: { span: 24 },
-          sm: { span: 5 },
+          sm: { span: 6 },
         },
         wrapperCol: {
           xs: { span: 24 },
@@ -95,11 +80,26 @@
         },
         confirmLoading: false,
         validatorRules: {
+          originalWarehouseId: [
+            { required: true, message: '璧峰搴撳瓨鍦扮偣蹇呴��', trigger: 'change' }
+          ],
+          workOrderId: [
+            { required: true, message: '浠诲姟鍙峰繀閫�', trigger: 'change' }
+          ],
+          materialNumber: [
+            { required: true, message: '鎷夊姩鐗╂枡蹇呴��', trigger: 'change' }
+          ],
+          specifiedQuantity: [
+            { required: true, message: '鎷夊姩鏁伴噺蹇呭~', trigger: 'change' }
+          ],
+          materialTransferCategory: [
+            { required: true, message: '鎷夊姩绫诲瀷蹇呴��', trigger: 'change' }
+          ],
         },
         url: {
-          add: "/mesmaterialtransferrequest/mesMaterialTransferRequest/add",
-          edit: "/mesmaterialtransferrequest/mesMaterialTransferRequest/edit",
-          queryById: "/mesmaterialtransferrequest/mesMaterialTransferRequest/queryById"
+          add: "/mes/mesMaterialTransferRequest/add",
+          edit: "/mes/mesMaterialTransferRequest/edit",
+          queryById: "/mes/mesMaterialTransferRequest/queryById"
         }
       }
     },
@@ -146,7 +146,7 @@
               that.confirmLoading = false;
             })
           }
-         
+
         })
       },
     }

--
Gitblit v1.9.3