From 45eee4177ef9df3b40d9c26bb60f92792b9cd95e Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期三, 21 五月 2025 14:40:05 +0800
Subject: [PATCH] 工具管理-工具出库申请

---
 src/views/tms/OutboundOrderList.vue                         |  375 +++++++++++++++
 src/views/tms/OutboundDetailList.vue                        |  238 +++++++++
 src/views/tms/modules/outBound/OutboundDetailModal.vue      |  143 +++++
 src/views/tms/modules/outBound/JSelectOutboundToolModal.vue |  246 ++++++++++
 src/views/tms/modules/outBound/OutboundOrderModal.vue       |  386 ++++++++++++++++
 5 files changed, 1,388 insertions(+), 0 deletions(-)

diff --git a/src/views/tms/OutboundDetailList.vue b/src/views/tms/OutboundDetailList.vue
new file mode 100644
index 0000000..94181cc
--- /dev/null
+++ b/src/views/tms/OutboundDetailList.vue
@@ -0,0 +1,238 @@
+<template>
+  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
+    <!-- 鏌ヨ鍖哄煙 -->
+<!--    <div class="table-page-search-wrapper">-->
+<!--      <a-form layout="inline" @keyup.enter.native="searchQuery">-->
+<!--        <a-row :gutter="24">-->
+<!--        </a-row>-->
+<!--      </a-form>-->
+<!--    </div>-->
+    <!-- 鏌ヨ鍖哄煙-END -->
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator" v-if="mainId">
+<!--      <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>-->
+<!--      <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>-->
+<!--        <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>椤�-->
+<!--        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>-->
+<!--      </div>-->
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :scroll="{x:true}"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="null"
+        @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>-->
+<!--          <a-divider type="vertical" />-->
+<!--          <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">-->
+<!--            <a>鍒犻櫎</a>-->
+<!--          </a-popconfirm>-->
+<!--        </span>-->
+
+      </a-table>
+    </div>
+
+    <outboundDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></outboundDetail-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import OutboundDetailModal from './modules/outBound/OutboundDetailModal'
+
+  export default {
+    name: "OutboundDetailList",
+    mixins:[JeecgListMixin],
+    components: { OutboundDetailModal },
+    props:{
+      mainId:{
+        type:String,
+        default:'',
+        required:false
+      }
+    },
+    watch:{
+      mainId:{
+        immediate: true,
+        handler(val) {
+          if(!this.mainId){
+            this.clearList()
+          }else{
+            this.queryParam['outStorehouseId'] = val
+            this.loadData(1);
+          }
+        }
+      }
+    },
+    data () {
+      return {
+        description: 'tms_outbound_order绠$悊椤甸潰',
+        disableMixinCreated:true,
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'鍒�鍏风紪鐮�',
+            align:"center",
+            dataIndex: 'toolNum'
+          },
+          {
+            title:'宸ュ叿绫诲瀷',
+            align:"center",
+            dataIndex: 'applicationType_dictText'
+          },
+          {
+            title:'涓枃鍚嶇О',
+            align:"center",
+            dataIndex: 'chineseName'
+          },
+          {
+            title:'鍨嬪彿/鍥惧彿',
+            align:"center",
+            dataIndex: 'toolModel'
+          },
+          {
+            title:'鍒�鍏锋潗鏂�',
+            align:"center",
+            dataIndex: 'toolMaterial'
+          },
+          {
+            title:'闆朵欢鏉愭枡',
+            align:"center",
+            dataIndex: 'partMaterial'
+          },
+          {
+            title:'鍘傚',
+            align:"center",
+            dataIndex: 'supplierId'
+          },
+          {
+            title:'浠撳簱',
+            align:"center",
+            dataIndex: 'warehouseName'
+          },
+          {
+            title:'鍑哄簱搴撲綅',
+            align:"center",
+            dataIndex: 'outboundLocation'
+          },
+          {
+            title:'鐢宠鍑哄簱鏁伴噺',
+            align:"center",
+            dataIndex: 'outboundQuantity'
+          },
+          {
+            title:'瀹為檯鍑哄簱鏁伴噺',
+            align:"center",
+            dataIndex: 'outActualCount'
+          },
+          {
+            title:'鍑哄簱鐘舵��',
+            align:"center",
+            dataIndex: 'status_dictText'
+          },
+          {
+            title:'鍒涘缓鏃堕棿',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          // {
+          //   title: '鎿嶄綔',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' },
+          // }
+        ],
+        url: {
+          list: "/tms/outboundOrder/listOutboundDetailByMainId",
+          delete: "/tms/outboundOrder/deleteOutboundDetail",
+          deleteBatch: "/tms/outboundOrder/deleteBatchOutboundDetail",
+          exportXlsUrl: "/tms/outboundOrder/exportOutboundDetail",
+          importUrl: "/tms/outboundOrder/importOutboundDetail",
+        },
+        dictOptions:{
+         outStorehouseType:[],
+        }
+      }
+    },
+    created() {
+    },
+    computed: {
+      importExcelUrl(){
+        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
+      }
+    },
+    methods: {
+      clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
+      }
+
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>
diff --git a/src/views/tms/OutboundOrderList.vue b/src/views/tms/OutboundOrderList.vue
new file mode 100644
index 0000000..0b58b9c
--- /dev/null
+++ b/src/views/tms/OutboundOrderList.vue
@@ -0,0 +1,375 @@
+<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.outNum"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="鍑哄簱绫诲瀷">
+              <j-dict-select-tag placeholder="璇烽�夋嫨鍑哄簱绫诲瀷" v-model="queryParam.outStorehouseType" dictCode="out_storehouse_type"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="瀹℃牳鐘舵��">
+                <j-dict-select-tag placeholder="璇烽�夋嫨瀹℃牳鐘舵��" v-model="queryParam.orderStatus" dictCode="out_bill_status"/>
+              </a-form-item>
+            </a-col>
+          </template>
+          <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 type="primary" icon="download" @click="handleExportXls('tms_outbound_order')">瀵煎嚭</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:'radio'}"
+        :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-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record)">
+              <a>鎻愪氦</a>
+            </a-popconfirm>
+            <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>
+        </span>
+
+      </a-table>
+    </div>
+
+    <a-tabs defaultActiveKey="1">
+      <a-tab-pane tab="鍑哄簱鐢宠鍗曟槑缁�" key="1" >
+        <OutboundDetailList ref="outboundDetailList" :mainId="outboundDetailMainId" />
+      </a-tab-pane>
+    </a-tabs>
+
+    <outboundOrder-modal ref="modalForm" @ok="modalFormOk"></outboundOrder-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import OutboundOrderModal from './modules/outBound/OutboundOrderModal'
+  import { getAction, deleteAction } from '@/api/manage'
+  import OutboundDetailList from './OutboundDetailList'
+  import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+  import '@/assets/less/TableExpand.less'
+
+  export default {
+    name: "OutboundOrderList",
+    mixins:[JeecgListMixin],
+    components: {
+      OutboundDetailList,
+      OutboundOrderModal
+    },
+    data () {
+      return {
+        description: 'tms_outbound_order绠$悊椤甸潰',
+        // 琛ㄥご
+        columns: [
+          {
+            title:'鍑哄簱绫诲瀷',
+            align:"center",
+            dataIndex: 'outStorehouseType_dictText',
+          },
+          {
+            title:'鍑哄簱鍗曠紪鍙�',
+            align:"center",
+            dataIndex: 'outNum'
+          },
+          {
+            title:'鍗曟嵁鐘舵��',
+            align:"center",
+            dataIndex: 'orderStatus_dictText'
+          },
+          {
+            title:'缁忔墜浜�',
+            align:"center",
+            dataIndex: 'handler_dictText'
+          },
+          {
+            title:'瀹℃牳浜�',
+            align:"center",
+            dataIndex: 'reviewer_dictText'
+          },
+          {
+            title:'瀹℃牳鏃堕棿',
+            align:"center",
+            dataIndex: 'auditDate'
+          },
+          {
+            title:'瀹℃牳鎰忚',
+            align:"center",
+            dataIndex: 'approvalOpinion'
+          },
+          {
+            title:'鐢宠鍑哄簱鏃堕棿',
+            align:"center",
+            dataIndex: 'outboundTime'
+          },
+          {
+            title:'鍑哄簱鐘舵��',
+            align:"center",
+            dataIndex: 'outStatus_dictText'
+          },
+          {
+            title:'棰嗙敤浜嬬敱',
+            align:"center",
+            dataIndex: 'subjectMatter'
+          },
+          {
+            title:'澶囨敞',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title:'鎿嶄綔鍛�',
+            align:"center",
+            dataIndex: 'createBy'
+          },
+          {
+            title:'鍒涘缓鏃堕棿',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        url: {
+          list: "/tms/outboundOrder/list",
+          delete: "/tms/outboundOrder/delete",
+          submit: "/tms/outboundOrder/submit",
+          deleteBatch: "/tms/outboundOrder/deleteBatch",
+          exportXlsUrl: "/tms/outboundOrder/exportXls",
+          importExcelUrl: "tms/outboundOrder/importExcel",
+        },
+        dictOptions:{
+         outStorehouseType:[],
+        },
+        /* 鍒嗛〉鍙傛暟 */
+        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:[],
+        outboundDetailMainId: '',
+      }
+    },
+    created() {
+      this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      modalFormOk() {
+        this.$refs.outboundDetailList.clearList()
+        this.loadData();
+      },
+      searchReset() {
+        this.queryParam = {}
+        this.onClearSelected()
+        this.$refs.outboundDetailList.clearList()
+        this.loadData(1);
+      },
+      initDictConfig(){
+      },
+      clickThenSelect(record) {
+        return {
+          on: {
+            click: () => {
+              this.onSelectChange(record.id.split(","), [record]);
+            }
+          }
+        }
+      },
+      onClearSelected() {
+        this.selectedRowKeys = [];
+        this.selectionRows = [];
+        this.selectedMainId = ''
+        this.outboundDetailMainId = ''
+      },
+      onSelectChange(selectedRowKeys, selectionRows) {
+        this.selectedMainId=selectedRowKeys[0]
+        this.selectedRowKeys = selectedRowKeys;
+        this.selectionRows = selectionRows;
+        this.outboundDetailMainId = selectionRows[0]['id']
+      },
+      handleSubmit(record) {
+        getAction(this.url.submit,{ id: record.id }).then((res)=>{
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+            this.$refs.outboundDetailList.clearList()
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+      },
+      handleDelete: function (id) {
+        if(!this.url.delete){
+          this.$message.error("璇疯缃畊rl.delete灞炴��!")
+          return
+        }
+        var that = this;
+        deleteAction(that.url.delete, {id: id}).then((res) => {
+          if (res.success) {
+            //閲嶆柊璁$畻鍒嗛〉闂
+            that.reCalculatePage(1)
+            // that.$message.success(res.message);
+            that.$notification.success({
+              message:'娑堟伅',
+              description:res.message
+            });
+            that.loadData();
+            this.$refs.outboundDetailList.clearList()
+          } else {
+            // that.$message.warning(res.message);
+            that.$notification.warning({
+              message:'娑堟伅',
+              description:res.message
+            });
+          }
+        });
+      },
+      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:'outNum',text:'鍑哄簱鍗曠紪鍙�',dictCode:''})
+        fieldList.push({type:'string',value:'outStorehouseType',text:'鍑哄簱绫诲瀷',dictCode:'out_storehouse_type'})
+        fieldList.push({type:'string',value:'handler',text:'缁忔墜浜�',dictCode:''})
+        fieldList.push({type:'sel_user',value:'reviewer',text:'瀹℃牳浜�'})
+        fieldList.push({type:'string',value:'orderStatus',text:'鍗曞瓙鐘舵��',dictCode:''})
+        fieldList.push({type:'date',value:'auditDate',text:'瀹℃牳鏃堕棿'})
+        fieldList.push({type:'string',value:'approvalOpinion',text:'瀹℃牳鎰忚',dictCode:''})
+        fieldList.push({type:'string',value:'subjectMatter',text:'棰嗙敤浜嬬敱',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:'鍒涘缓鏃堕棿'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>
\ No newline at end of file
diff --git a/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue b/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue
new file mode 100644
index 0000000..2ffd5b2
--- /dev/null
+++ b/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue
@@ -0,0 +1,246 @@
+<template>
+  <!--鏀寔鍏ㄥ睆缂╂斁-->
+  <j-modal
+    :visible="visible"
+    :width="1200"
+    :title="title"
+    switchFullscreen
+    @ok="handleSubmit"
+    @cancel="close"
+    style="top: 50px"
+    cancelText="鍏抽棴"
+  >
+    <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.toolCode"></a-input>
+              </a-form-item>
+            </a-col>
+            <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-row>
+        </a-form>
+      </div>
+      <!--鍑哄簱鍗曞垪琛�-->
+      <a-table
+        ref="table"
+        size="middle"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :rowSelection="rowSelection"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+      </a-table>
+    </a-card>
+  </j-modal>
+</template>
+
+<script>
+import { filterObj } from '@/utils/util'
+import { getAction } from '@api/manage'
+
+export default {
+  name: 'JSelectOutboundToolModal',
+  components: {},
+  props: {},
+  data() {
+    return {
+      title: '閫夋嫨鍑哄簱宸ュ叿',
+      queryParam: {},
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key:'rowIndex',
+          width:60,
+          align:"center",
+          customRender:function (t,r,index) {
+            return parseInt(index)+1;
+          }
+        },
+        {
+          title:'宸ュ叿缂栫爜',
+          align:"center",
+          dataIndex: 'toolNum'
+        },
+        {
+          title:'宸ュ叿缂栧彿',
+          align:"center",
+          dataIndex: 'toolId'
+        },
+        {
+          title:'鍙敤搴撳瓨鏁伴噺',
+          align:"center",
+          dataIndex: 'quantity'
+        },
+        {
+          title:'鎵�鍦ㄤ粨搴�',
+          align:"center",
+          dataIndex: 'warehouseName'
+        },
+        {
+          title:'鎵�鍦ㄥ簱浣嶅彿',
+          align:"center",
+          dataIndex: 'positionCode'
+        },
+        // {
+        //   title:'鍑哄簱鐘舵��;1.鏈嚭搴擄紱2.閮ㄥ垎鍑哄簱锛�3.鍑哄簱瀹屾垚',
+        //   align:"center",
+        //   dataIndex: 'status'
+        // },
+        // {
+        //   title: '鎿嶄綔',
+        //   dataIndex: 'action',
+        //   align:"center",
+        //   fixed:"right",
+        //   width:147,
+        //   scopedSlots: { customRender: 'action' },
+        // }
+      ],
+      selectedRowKeys: [],
+      oldSelectRow: [],
+      scrollTrigger: { x: 1500, y: 500 },
+      dataSource: [],
+      selectionRows: [],
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['5', '10', '20'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      isorter: {
+        column: 'toolCode',
+        order: 'asc',
+      },
+      departTree: [],
+      visible: false,
+      loading: false,
+      prepareKnifeDetailList:[],
+      url: {
+        list: '/tms/toolLedgerDetail/list'
+      },
+    }
+  },
+  computed: {
+    rowSelection() {
+      return {
+        type: 'checkbox',
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.onSelectChange(selectedRows)
+        },
+        getCheckboxProps: (record) => ({
+          props: {
+            disabled: record.disabled,
+          },
+        }),
+      }
+    },
+  },
+  watch: {
+  },
+  created() {
+  },
+  methods: {
+    async loadData(arg) {
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      this.loading = true
+      let params = this.getQueryParams() //鏌ヨ鏉′欢
+      console.log(params)
+      await 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
+      })
+    },
+    showModal(oldSelectRow) {
+      this.oldSelectRow = oldSelectRow
+      this.visible = true
+      this.queryParam.status = '1'
+      this.queryParam.excludeIds = oldSelectRow
+      this.loadData(1)
+    },
+    getQueryParams() {
+      let param = Object.assign({}, this.queryParam, this.isorter)
+      param.field = this.getQueryField()
+      param.pageNo = this.ipagination.current
+      param.pageSize = this.ipagination.pageSize
+      return filterObj(param)
+    },
+    //鏌ヨ鏉′欢澶勭悊
+    getQueryField() {
+      let fields = ['id'];
+      for (let a = 0; a < this.columns.length; a++) {
+        fields.push(this.columns[a].dataIndex);
+      }
+      return fields.join(',');
+    },
+    searchReset() {
+      this.queryParam = {}
+      this.loadData(1)
+    },
+    close() {
+      this.queryParam = {}
+      // this.searchReset(0)
+      this.selectedRowKeys = []
+      this.selectionRows = []
+      this.visible = false
+    },
+    handleTableChange(pagination, filters, sorter) {
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
+      }
+      this.ipagination = pagination
+      this.loadData()
+    },
+    handleSubmit() {
+      if (this.selectionRows.length > 0) {
+        this.$bus.$emit('selectionRows', this.selectionRows)
+        // this.searchReset(0)
+        this.close()
+      } else {
+        this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
+      }
+    },
+    onSelectChange(selectionRows) {
+      this.selectionRows = selectionRows
+    },
+    searchQuery() {
+      this.loadData(1)
+    },
+  },
+}
+</script>
+
+<style scoped>
+.ant-table-tbody .ant-table-row td {
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+#components-layout-demo-custom-trigger .trigger {
+  font-size: 18px;
+  line-height: 64px;
+  padding: 0 24px;
+  cursor: pointer;
+  transition: color 0.3s;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/tms/modules/outBound/OutboundDetailModal.vue b/src/views/tms/modules/outBound/OutboundDetailModal.vue
new file mode 100644
index 0000000..0d06ebd
--- /dev/null
+++ b/src/views/tms/modules/outBound/OutboundDetailModal.vue
@@ -0,0 +1,143 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="鍒�鍏风紪鐮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolCode">
+              <a-input v-model="model.toolCode"placeholder="璇疯緭鍏ュ垁鍏风紪鐮�" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鐢宠鍑哄簱鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundQuantity">
+              <a-input-number v-model="model.outboundQuantity"placeholder="璇疯緭鍏ョ敵璇峰嚭搴撴暟閲�" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="浠撳簱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="storageLocation">
+              <a-input v-model="model.storageLocation"placeholder="璇疯緭鍏ヤ粨搴�" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍑哄簱搴撲綅" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundLocation">
+              <a-input v-model="model.outboundLocation"placeholder="璇疯緭鍏ュ嚭搴撳簱浣�" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍑哄簱鐘舵��;1.鏈嚭搴擄紱2.閮ㄥ垎鍑哄簱锛�3.鍑哄簱瀹屾垚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+              <a-input-number v-model="model.status"placeholder="璇疯緭鍏ュ嚭搴撶姸鎬�;1.鏈嚭搴擄紱2.閮ㄥ垎鍑哄簱锛�3.鍑哄簱瀹屾垚" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: "OutboundDetailModal",
+    components: {
+    },
+    props:{
+      mainId:{
+        type:String,
+        required:false,
+        default:''
+      }
+    },
+    data () {
+      return {
+        title:"鎿嶄綔",
+        width:800,
+        visible: false,
+        model:{
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/tms/outboundOrder/addOutboundDetail",
+          edit: "/tms/outboundOrder/editOutboundDetail",
+        }
+
+      }
+    },
+    created () {
+    //澶囦唤model鍘熷鍊�
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleOk () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            this.model['outStorehouseId'] = this.mainId
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+          }else{
+             return false
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
diff --git a/src/views/tms/modules/outBound/OutboundOrderModal.vue b/src/views/tms/modules/outBound/OutboundOrderModal.vue
new file mode 100644
index 0000000..fc2e217
--- /dev/null
+++ b/src/views/tms/modules/outBound/OutboundOrderModal.vue
@@ -0,0 +1,386 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item label="鍑哄簱鍗曠紪鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outNum">
+              <a-input :disabled="true" v-model="model.outNum" placeholder="绯荤粺鑷姩鐢熸垚"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="鍑哄簱绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outStorehouseType">
+              <j-dict-select-tag :disabled="disableSubmit" @change="handleTypeChange" type="list" v-model="model.outStorehouseType" dictCode="out_storehouse_type" placeholder="璇烽�夋嫨鍑哄簱绫诲瀷" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item label="鍑哄簱鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundTime">
+              <j-date :disabled="disableSubmit" :show-time="true" dateFormat="YYYY-MM-DD HH:mm" placeholder="璇烽�夋嫨鍑哄簱鏃堕棿" v-model="model.outboundTime" style="width: 100%"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="棰嗙敤浜嬬敱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="subjectMatter">
+              <a-input :disabled="disableSubmit" v-model="model.subjectMatter" placeholder="璇疯緭鍏ラ鐢ㄤ簨鐢�" ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item label="瀹℃牳浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reviewer">
+              <j-select-user-by-dep :disabled="disableSubmit" v-model="model.reviewer" :store="'id'" :text="'realname'" :multi="false" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item v-if="addShow" label="缁忔墜浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler">
+              <j-select-user-by-dep v-model="model.handler" :store="'id'" :text="'realname'" :multi="false" disabled/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item v-if="addShow" label="鍗曞瓙鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderStatus">
+              <j-dict-select-tag type="list" v-model="model.orderStatus" dictCode="out_bill_status" placeholder="璇烽�夋嫨鍗曞瓙鐘舵��" disabled/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item v-if="addShow" label="瀹℃牳鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditDate">
+              <j-date placeholder="璇烽�夋嫨瀹℃牳鏃堕棿" v-model="model.auditDate" style="width: 100%" disabled/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item v-if="addShow" label="瀹℃牳鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinion">
+              <a-input v-model="model.approvalOpinion" placeholder="璇疯緭鍏ュ鏍告剰瑙�" disabled></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-textarea :disabled="disableSubmit" v-model="model.remark" rows="4" placeholder="璇疯緭鍏ュ娉�" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+
+    <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectOutBoundTool">閫夋嫨鍑哄簱宸ュ叿</a-button>
+    <a-table
+      ref="table"
+      size="middle"
+      bordered
+      rowKey="id"
+      :scroll="{x:true}"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      :rowSelection="null"
+      @change="handleTableChange">
+
+      <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index">
+        <div :key="col.dataIndex">
+          <a-input-number
+            v-if="col.dataIndex === 'outboundQuantity'"
+            :disabled="record.quantity <= 1"
+            :value="text"
+            @change="(e) => handleChange(e, record.key, col, index)"
+            :min="1"
+          />
+        </div>
+      </template>
+      <span slot="action" v-if="disableSubmit === false" slot-scope="text, record, index">
+        <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record, index)">
+          <a>鍒犻櫎</a>
+        </a-popconfirm>
+      </span>
+    </a-table>
+    <template slot="footer" v-if="disableSubmit === false">
+      <a-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button>
+      <a-button @click="handleOk" :disabled="isDisabled" type="primary">纭畾</a-button>
+    </template>
+
+    <j-select-outbound-tool-modal ref="selectOutBoundToolModal"></j-select-outbound-tool-modal>
+  </j-modal>
+
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+  import OutboundDetailList from '../../OutboundDetailList.vue'
+  import JSelectOutboundToolModal from './JSelectOutboundToolModal.vue'
+  import { getAction } from '../../../../api/manage'
+  import title from 'ant-design-vue/lib/skeleton/Title'
+
+  export default {
+    name: "OutboundOrderModal",
+    components: {
+      OutboundDetailList,
+      JSelectOutboundToolModal
+    },
+    data () {
+      return {
+        title: '',
+        width:1200,
+        visible: false,
+        disableSubmit: false,
+        isDisabled: false,
+        addShow: true,
+        selectBorrowTool: false,
+        model:{
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        //琛ㄦ牸鍙傛暟
+        ipagination: {
+          current: 1,
+          pageSize: 10,
+          total: 0,
+        },
+        dataSource: [],
+        loading: false,
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'宸ュ叿缂栫爜',
+            align:"center",
+            dataIndex: 'toolNum'
+          },
+          {
+            title:'宸ュ叿缂栧彿',
+            align:"center",
+            dataIndex: 'toolId'
+          },
+          {
+            title:'鍙敤搴撳瓨',
+            align:"center",
+            dataIndex: 'quantity'
+          },
+          {
+            title:'鐢宠鍑哄簱鏁伴噺',
+            align:"center",
+            dataIndex: 'outboundQuantity',
+            scopedSlots: { customRender: 'outboundQuantity' },
+          },
+          {
+            title:'鍑哄簱浠撳簱',
+            align:"center",
+            dataIndex: 'warehouseName'
+          },
+          {
+            title:'鍑哄簱搴撲綅',
+            align:"center",
+            dataIndex: 'outboundLocation'
+          },
+          // {
+          //   title:'鍑哄簱鐘舵��;1.鏈嚭搴擄紱2.閮ㄥ垎鍑哄簱锛�3.鍑哄簱瀹屾垚',
+          //   align:"center",
+          //   dataIndex: 'status'
+          // },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        confirmLoading: false,
+        validatorRules: {
+           outStorehouseType: [
+              { required: true, message: '璇疯緭鍏ュ嚭搴撶被鍨�!'},
+           ],
+           subjectMatter: [
+              { required: true, message: '璇疯緭鍏ラ鐢ㄤ簨鐢�!'},
+           ],
+        },
+        url: {
+          list: "/tms/outboundOrder/listOutboundDetailByMainId",
+          add: "/tms/outboundOrder/addTotal",
+          edit: "/tms/outboundOrder/editTotal",
+        }
+
+      }
+    },
+    created () {
+    //澶囦唤model鍘熷鍊�
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    mounted() {
+      this.$bus.$on('selectionRows', (data) => {
+        for (let i = 0; i < data.length; i++) {
+          this.dataSource.push({
+            id: data[i].id,
+            toolCode:data[i].toolCode,
+            toolNum:data[i].toolNum,
+            toolId: data[i].toolId,
+            quantity: data[i].quantity,
+            outboundQuantity: data[i].quantity,
+            storageLocation: data[i].warehouseId,
+            warehouseName: data[i].warehouseName,
+            outboundLocation: data[i].positionCode
+          })
+        }
+        this.ipagination.total = this.dataSource.length
+      })
+    },
+    methods: {
+      handleTypeChange(value) {
+        if (value === '1') {
+          this.selectBorrowTool = true
+        }
+        if (value === '2') {
+          this.selectBorrowTool = false
+        }
+        if (value === '3') {
+          this.selectBorrowTool = false
+        }
+        if (value === '4') {
+          this.selectBorrowTool = false
+        }
+      },
+      handleDelete(record, index) {
+        this.dataSource.splice(index, 1)
+      },
+      handleChange(value, key, column, index) {
+        console.log(value, key, column, index)
+        const temp = [...this.dataSource]
+        const target = temp.filter(item => key === item.key)[index];
+        if (target) {
+          target[column.dataIndex] = value
+          this.dataSource = temp
+          if(column.dataIndex === 'outboundQuantity'){
+            if(target['quantity']<value){
+              this.$message.error('鐢宠鍑哄簱鏁伴噺涓嶈兘澶т簬鍙敤搴撳瓨!')
+              this.isDisabled = true
+            }else{
+              this.isDisabled = false
+            }
+          }
+          this.dataSource = temp
+        }
+      },
+      selectOutBoundTool() {
+        console.log(this.dataSource)
+        let ids = ''
+        if (this.title === '鏂板') {
+          ids = this.dataSource.map(item => item.id).join(',')
+        }
+        if (this.title === '缂栬緫') {
+         ids = this.dataSource.map(item => item.toolLedgerDetailId).join(',')
+        }
+        this.$refs.selectOutBoundToolModal.showModal(ids)
+      },
+      add () {
+        this.addShow = false
+        this.edit(this.modelDefault);
+        this.dataSource = []
+      },
+      edit (record) {
+        if (record.id) {
+          getAction(this.url.list,{ outStorehouseId : record.id }).then(res => {
+            if (res.success) {
+              this.dataSource = res.result.records
+            }
+            if (this.title === '缂栬緫') {
+              const type = record.outStorehouseType
+              switch (type) {
+                case '1':
+                  this.handleTypeChange('1')
+                  break
+                case '2':
+                  this.handleTypeChange('2')
+                  break
+                case '3':
+                  this.handleTypeChange('3')
+                  break
+                case '4':
+                  this.handleTypeChange('4')
+                  break
+              }
+            }
+          })
+        }
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      close () {
+        this.$emit('close');
+        this.addShow = true
+        this.selectBorrowTool = false
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleTableChange(pagination, filters, sorter) {
+        this.ipagination = pagination
+      },
+      handleOk () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            this.model.outboundDetailList = this.dataSource
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+          }else{
+             return false
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
\ No newline at end of file

--
Gitblit v1.9.3