zhangafei 1 周之前
父節點
當前提交
5de3a85fbf
共有 2 個文件被更改,包括 30 次插入3 次删除
  1. 28 1
      src/views/billet/shippingBill/index.vue
  2. 2 2
      src/views/billet/storageAndTransportation/index.vue

+ 28 - 1
src/views/billet/shippingBill/index.vue

@@ -157,6 +157,21 @@
     <stack @register="registerStackingEntruckingModal" :machine="queryParam.ccmNo" @success="handleSuccess" />
     <!-- 打印 -->
     <printModal @register="registerPrintModal" @success="handleSuccess" />
+    <!-- 修改目的地 -->
+    <a-modal v-model:open="openTypeConfigIdModal" title="切换目的地" centered width="400px" :footer="null">
+      <div class="flex justify-center items-center" style="padding: 20px">
+        <div>选择目的地:</div>
+        <JSearchSelect
+          type="list"
+          style="width: 200px"
+          v-model:value="currentRecord.destinationId"
+          :options="destinationOptions[currentRecord.ccmNo]"
+          placeholder="请选择"
+          allowClear
+          @change="(v) => handleDestinationIdChange(v, currentRecord)"
+        />
+      </div>
+    </a-modal>
   </div>
 </template>
 
@@ -286,6 +301,8 @@
     ]);
   }
 
+  const openTypeConfigIdModal = ref(false);
+  const currentRecord = ref<any>();
   /**
    * 下拉操作栏
    */
@@ -303,6 +320,14 @@
         onClick: handleLog.bind(null, record),
         disabled: false,
       },
+      {
+        label: '修改目的地',
+        onClick: () => {
+          openTypeConfigIdModal.value = true;
+          currentRecord.value = record;
+        },
+        disabled: false,
+      },
       {
         label: '删除',
         popConfirm: {
@@ -515,12 +540,14 @@
       okText: '确认',
       cancelText: '取消',
       onOk: () => {
-        return destinationSwitch({
+        const fetchFn = record.typeConfigId === '1024' ? edit : destinationSwitch;
+        return fetchFn({
           ...record,
           typeConfigId: v,
           destination: destinationInfo.label,
         }).then(() => {
           handleSuccess();
+          openTypeConfigIdModal.value = false;
         });
       },
       onCancel: () => {

+ 2 - 2
src/views/billet/storageAndTransportation/index.vue

@@ -174,8 +174,8 @@
     alwaysShowLines: 3,
     //将表单内时间区域的值映射成 2个字段, 'YYYY-MM-DD'日期格式化
     fieldMapToTime: [
-      ['createTime', ['createTime_begin', 'createTime_end'], 'YYYY-MM-DD'],
-      ['storageTime', ['storageTime_begin', 'storageTime_end'], 'YYYY-MM-DD'],
+      ['createTime', ['createTime_begin', 'createTime_end'], 'YYYY-MM-DD HH:mm:ss'],
+      ['storageTime', ['storageTime_begin', 'storageTime_end'], 'YYYY-MM-DD HH:mm:ss'],
     ],
     //每列占比,默认一行为24
     baseColProps: { span: 6 },