From 1e653db94c24389cc7615fd4a7ef1d63b00af534 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期五, 13 六月 2025 11:39:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/tms/PreparationOrderList.vue |  363 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 363 insertions(+), 0 deletions(-)

diff --git a/src/views/tms/PreparationOrderList.vue b/src/views/tms/PreparationOrderList.vue
new file mode 100644
index 0000000..22f735f
--- /dev/null
+++ b/src/views/tms/PreparationOrderList.vue
@@ -0,0 +1,363 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="鍑嗗鍗曠紪鍙�">
+              <a-input placeholder="璇疯緭鍏ュ噯澶囧崟缂栧彿" v-model="queryParam.preparationOrderNum"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="鍗曟嵁鐘舵��">
+              <a-select placeholder="璇疯緭鍏ュ噯澶囧崟缂栧彿" v-model="queryParam.orderStatus">
+                <a-select-option value="1">寰呭鏍�</a-select-option>
+                <a-select-option value="2">宸插鏍�</a-select-option>
+                <a-select-option value="3">宸茶浆鍑�</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+<!--              <a @click="handleToggleSearch" style="margin-left: 8px">-->
+<!--                {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}-->
+<!--                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
+<!--              </a>-->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 鏌ヨ鍖哄煙-END -->
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+<!--      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>-->
+      <a-button @click="handleConvert" type="primary" icon="arrow-right">杞嚭搴撶敵璇峰崟</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>-->
+    </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>椤�
+        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        class="j-table-force-nowrap"
+        :scroll="{x:true}"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}"
+        :customRow="clickThenSelect"
+        @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="handleDetail(record)">璇︽儏</a>
+          <span v-if="record.orderStatus === '1'">
+            <a-divider type="vertical" />
+            <a @click="handleConfirm(record)">瀹℃牳</a>
+            <a-divider type="vertical" />
+            <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+                    <a>鍒犻櫎</a>
+            </a-popconfirm>
+          </span>
+
+<!--          <a-divider type="vertical" />-->
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handleEdit(record)">缂栬緫</a>-->
+<!--              </a-menu-item>-->
+<!--              <a-menu-item>-->
+<!--                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">-->
+<!--                  <a>鍒犻櫎</a>-->
+<!--                </a-popconfirm>-->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
+        </span>
+
+      </a-table>
+    </div>
+
+    <a-tabs defaultActiveKey="1">
+      <a-tab-pane tab="鍒�鍏峰噯澶囧崟鏄庣粏" key="1" >
+        <PreparationOrderDetailList :mainId="preparationOrderDetailMainId" />
+      </a-tab-pane>
+    </a-tabs>
+
+    <preparationOrder-modal ref="modalForm" @ok="modalFormOk"></preparationOrder-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import PreparationOrderModal from './modules/preparationOrder/PreparationOrderModal'
+  import { getAction } from '@/api/manage'
+  import PreparationOrderDetailList from './PreparationOrderDetailList'
+  import '@/assets/less/TableExpand.less'
+  import { postAction } from '../../api/manage'
+
+  export default {
+    name: "PreparationOrderList",
+    mixins:[JeecgListMixin],
+    components: {
+      PreparationOrderDetailList,
+      PreparationOrderModal
+    },
+    data () {
+      return {
+        description: '鍒�鍏峰噯澶囧崟绠$悊椤甸潰',
+        // 琛ㄥご
+        columns: [
+          {
+            title:'鍑嗗鍗曠紪鍙�',
+            align:"left",
+            dataIndex: 'preparationOrderNum'
+          },
+          {
+            title:'闆朵欢鍥惧彿',
+            align:"center",
+            dataIndex: 'partDrawingNo'
+          },
+          {
+            title:'闆朵欢鍚嶇О',
+            align:"center",
+            dataIndex: 'partName'
+          },
+          {
+            title:'闆朵欢鏉愭枡',
+            align:"center",
+            dataIndex: 'partMaterial'
+          },
+          {
+            title:'宸ュ簭',
+            align:"center",
+            dataIndex: 'productionProcessesNo'
+          },
+          {
+            title:'鍔犲伐鎵规',
+            align:"center",
+            dataIndex: 'batchCode'
+          },
+          {
+            title:'鍔犲伐鏁伴噺',
+            align:"left",
+            dataIndex: 'machiningCount'
+          },
+          {
+            title:'鍔犲伐璁惧',
+            align:"center",
+            dataIndex: 'equipmentCode'
+          },
+          {
+            title:'绋嬪簭鍚�',
+            align:"center",
+            dataIndex: 'ncName'
+          },
+          {
+            title:'鍗曞瓙鐘舵��',
+            align:"center",
+            dataIndex: 'orderStatus_dictText'
+          },
+          {
+            title:'鎻愪氦鏃堕棿(鎻愪氦鑷冲嚭搴撶敵璇�)',
+            align:"center",
+            dataIndex: 'outboundTime'
+          },
+          {
+            title:'澶囨敞',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title:'鍒涘缓浜�',
+            align:"center",
+            dataIndex: 'createBy'
+          },
+          {
+            title:'鍒涘缓鏃堕棿(DNC鎺ㄩ�佹椂闂�)',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        url: {
+          list: "/tms/preparationOrder/list",
+          convertToOutboundOrder: "/tms/preparationOrder/convertToOutboundOrder",
+          delete: "/tms/preparationOrder/delete",
+          deleteBatch: "/tms/preparationOrder/deleteBatch",
+          exportXlsUrl: "/tms/preparationOrder/exportXls",
+          importExcelUrl: "tms/preparationOrder/importExcel",
+        },
+        dictOptions:{
+        },
+        /* 鍒嗛〉鍙傛暟 */
+        ipagination:{
+          current: 1,
+          pageSize: 5,
+          pageSizeOptions: ['5', '10', '50'],
+          showTotal: (total, range) => {
+            return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
+        },
+        selectedMainId:'',
+        superFieldList:[],
+        preparationOrderDetailMainId: '',
+      }
+    },
+    created() {
+      this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      handleConvert() {
+        if (this.selectedRowKeys.length < 1) {
+          this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉$敵璇峰崟鏁版嵁锛�')
+          return
+        }
+        console.log(this.selectionRows)
+        console.log(this.selectedRowKeys)
+        postAction(this.url.convertToOutboundOrder, this.selectedRowKeys).then((res) => {
+          if (res.success) {
+            this.$message.success(res.message)
+            this.loadData(this.ipagination.current)
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      handleConfirm(record) {
+        this.$refs.modalForm.edit(record);
+        this.$refs.modalForm.title = "瀹℃牳";
+        this.$refs.modalForm.disableSubmit = false;
+      },
+      searchReset() {
+        this.queryParam = {}
+        this.preparationOrderDetailMainId = ''
+        this.loadData(1)
+      },
+      initDictConfig(){
+      },
+      clickThenSelect(record) {
+        return {
+          on: {
+            click: () => {
+              this.onClickChange(record.id.split(","), [record]);
+            }
+          }
+        }
+      },
+      onClickChange(selectedRowKeys, selectionRows) {
+        this.preparationOrderDetailMainId = selectionRows[0]['id']
+      },
+      onClearSelected() {
+        this.selectedRowKeys = [];
+        this.selectionRows = [];
+        this.selectedMainId=''
+      },
+      onSelectChange(selectedRowKeys, selectionRows) {
+        this.selectedMainId=selectedRowKeys[0]
+        this.selectedRowKeys = selectedRowKeys;
+        this.selectionRows = selectionRows;
+      },
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("璇疯缃畊rl.list灞炴��!")
+          return
+        }
+        //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        this.onClearSelected()
+        var params = this.getQueryParams();//鏌ヨ鏉′欢
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            this.dataSource = res.result.records;
+            this.ipagination.total = res.result.total;
+          }
+          if(res.code===510){
+            this.$message.warning(res.message)
+          }
+          this.loading = false;
+        })
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'preparationOrderNum',text:'鍑嗗鍗曠紪鍙�',dictCode:''})
+        fieldList.push({type:'string',value:'partDrawingNo',text:'闆朵欢鍥惧彿',dictCode:''})
+        fieldList.push({type:'string',value:'partName',text:'闆朵欢鍚嶇О',dictCode:''})
+        fieldList.push({type:'string',value:'partMaterial',text:'闆朵欢鏉愭枡',dictCode:''})
+        fieldList.push({type:'string',value:'productionProcessesNo',text:'宸ュ簭锛堝伐姝ュ彿锛�',dictCode:''})
+        fieldList.push({type:'string',value:'batchCode',text:'鍔犲伐鎵规',dictCode:''})
+        fieldList.push({type:'string',value:'machiningCount',text:'鍔犲伐鏁伴噺',dictCode:''})
+        fieldList.push({type:'string',value:'equipmentCode',text:'鍔犲伐璁惧',dictCode:''})
+        fieldList.push({type:'string',value:'ncName',text:'绋嬪簭鍚�',dictCode:''})
+        fieldList.push({type:'BigDecimal',value:'outboundQuantity',text:'鍑嗗鍗曞嚭搴撴暟閲�',dictCode:''})
+        fieldList.push({type:'string',value:'orderStatus',text:'鍗曞瓙鐘舵��;1.鏈鏍革紱2.璋冩満鍛樺凡瀹℃牳锛�3.宸茶浆鍑哄簱鐢宠',dictCode:''})
+        fieldList.push({type:'date',value:'outboundTime',text:'鍑嗗鍗曟彁浜ゆ椂闂�;鎻愪氦鑷冲嚭搴撶敵璇峰崟鐨勬椂闂�'})
+        fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''})
+        fieldList.push({type:'string',value:'createBy',text:'鍒涘缓浜�',dictCode:''})
+        fieldList.push({type:'date',value:'createTime',text:'鍒涘缓鏃堕棿;DNC鎺ㄩ�佹暟鎹椂闂�'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>
\ No newline at end of file

--
Gitblit v1.9.3