mushencc 3 lat temu
rodzic
commit
b3ae9866b2

+ 6 - 6
src/routerMap/index.js

@@ -743,22 +743,22 @@ const routerMap = [{
             require(['@/views/Warehouse/FirstInventory/detail'], resolve),
     },
     {
-        path: '/cms/Warehouse/Dispatch/list',
-        name: 'DispatchList', // 仓库管理→收发存统计表→列表页
+        path: '/cms/Warehouse/Approval/list',
+        name: 'ApprovalList', // 仓库管理→收发存统计表→列表页
         meta: {
             index: 3
         },
         component: (resolve) =>
-            require(['@/views/Warehouse/Dispatch/list'], resolve),
+            require(['@/views/Warehouse/Approval/list'], resolve),
     },
     {
-        path: '/cms/Warehouse/Dispatch/detail',
+        path: '/cms/Warehouse/Approval/detail',
         name: 'DispatchDetail', // 仓库管理→收发存统计表→列表页
         meta: {
             index: 3
         },
         component: (resolve) =>
-            require(['@/views/Warehouse/Dispatch/detail'], resolve),
+            require(['@/views/Warehouse/Approval/detail'], resolve),
     },
     //2021年05月27日10:05:19
     {
@@ -955,7 +955,7 @@ const routerMap = [{
     },
     {
         path: '/cms/PurchasingManage/InstockOrder/edit',
-        name: 'InstockOrderEdit', //采购模块-->入库单列表
+        name: 'InstockOrderEdit', //采购模块-->入库单列表编辑
         meta: {
             index: 3
         },

+ 5 - 5
src/views/Approval/list.vue

@@ -50,10 +50,10 @@ export default {
     return {
       list: [
         { title: '订单号', name: 'Input', value: '', serverName: 'oa_order_no', placeholder: '请输入订单号' },
-        { title: '小区名称', name: 'Input', serverName: 'residential_name', value: '', placeholder: '请输入小区名称' },
+        { title: '项目名称', name: 'Input', serverName: 'residential_name', value: '', placeholder: '请输入项目名称' },
         { title: '提交人', name: 'Input', serverName: 'nickname', value: '', placeholder: '请选择提交人' },
         {
-          title: '审批状态', name: 'Select', placeholder: '请选择', value: '', serverName: 'state',
+          title: '审批状态', name: 'Select', placeholder: '请选择', value: 0, serverName: 'state',
           option: [
             { label: '审核中', value: 0 },
             { label: '通过', value: 1 },
@@ -76,7 +76,7 @@ export default {
       tableColums: [
         { type: 'selection', align: 'center', fixed: 'left', minWidth: 100, },
         { title: '订单号', align: 'center', key: 'oa_order_no', width: '180' },
-        { title: '小区名称', align: 'center', key: 'residential_name', minWidth: 100 },
+        { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 100 },
         // { title: '订单流水号', align: 'center', key: 'oa_order_no', minWidth: 200 },
         // {title:'订单类型',align:'center',key:'show_order_type',minWidth:100,
         //     render:(h,params)=>h('span',{},params.row.order_type == 1 ? '工装' : '家装')
@@ -98,7 +98,7 @@ export default {
               style: {
                 color: params.row.state == 0 ? '#FFA141' : (params.row.state == 1 ? '#32C800' : '#FF5E5C')
               }
-            }, params.row.state == 0 ? '待审批' : (params.row.state == 1 ? '同意' : (params.row.state == 2 ? '驳回' : '取消')))
+            }, params.row.state == 0 ? '审核中' : (params.row.state == 1 ? '通过' : (params.row.state == 2 ? '驳回' : '取消')))
           }
         },
         {
@@ -167,7 +167,7 @@ export default {
       row.type == 1 ? this.$router.push({
         // /cms/ordermannage/businessorderlist/details
         // path:'/cms/ordermannage/businessorderlist/decorationlist',
-        path: '/cms/BidSystem/ContractList/requistionDetail',
+        path: '/cms/BidSystem/ContractList/requisitionDetail',
         query: {
           oa_order_no: row.oa_order_no,
           order_no: row.order_no,

+ 15 - 15
src/views/BidSystem/ContractList/arrivalDetail.vue

@@ -2,12 +2,12 @@
   <div>
     <Toptitle title="工装单审批详情">
       <slot name="titleButton">
-        <Button @click="approval(1)"
+        <!-- <Button @click="approval(1)"
                 type="success"
                 style="margin-right:10px;">通过</Button>
         <Button @click="approval(2)"
                 type="error"
-                style="margin-right:10px;">驳回</Button>
+                style="margin-right:10px;">驳回</Button> -->
         <Button @click="goback()"
                 type="primary"
                 style="margin-right:10px;">返回</Button>
@@ -187,19 +187,19 @@ export default {
   },
   methods: {
     handleSet () { },
-    approval (status) {
-      let params = {
-        status,
-        type: this.type,
-        oa_order_no: this.$route.query.oa_order_no
-      }
-      this.axios.post('/api/order_price_oa_pull', params).then(res => {
-        if (res.code == 200) {
-          this.$Message.success(res.msg || '无提示')
-          // this.goback()
-        }
-      })
-    },
+    // approval (status) {
+    //   let params = {
+    //     status,
+    //     type: this.type,
+    //     oa_order_no: this.$route.query.oa_order_no
+    //   }
+    //   this.axios.post('/api/order_price_oa_pull', params).then(res => {
+    //     if (res.code == 200) {
+    //       this.$Message.success(res.msg || '无提示')
+    //       // this.goback()
+    //     }
+    //   })
+    // },
     goback () { this.$router.go(-1) },
     handleShowMore () {
       if (this.fullAreaList.length > 0) {

+ 1 - 1
src/views/BidSystem/ContractList/list.vue

@@ -663,7 +663,7 @@ export default {
       this.getData(this.proxyObj);
     },
     async exportData() {
-      const res = await this.axios("/api/measure_orders_export", {
+      const res = await this.axios("/api/work_export", {
         params: { ...this.proxyObj },
       });
       if (res.code == 200) {

+ 17 - 17
src/views/BidSystem/ContractList/purchaseDetail.vue

@@ -2,12 +2,12 @@
   <div>
     <Toptitle title="工装单审批详情">
       <slot name="titleButton">
-        <Button @click="approval(1)"
+        <!-- <Button @click="approval(1)"
                 type="success"
                 style="margin-right:10px;">通过</Button>
         <Button @click="approval(2)"
                 type="error"
-                style="margin-right:10px;">驳回</Button>
+                style="margin-right:10px;">驳回</Button> -->
         <Button @click="goback()"
                 type="primary"
                 style="margin-right:10px;">返回</Button>
@@ -26,7 +26,7 @@
         <div class="info">
           <div class="info_item"><span>制单人:</span><span>{{orderInfo.nickname}}</span></div>
           <div class="info_item"><span>采购类型:</span><span>{{orderInfo.type_title}}</span></div>
-          <div class="info_item"><span>项目名称:</span><span>{{orderInfo.client_name}}</span></div>
+          <div class="info_item"><span>项目名称:</span><span>{{orderInfo.residential_name}}</span></div>
           <div class="info_item"><span>单据号:</span><span>{{orderInfo.order_no}}</span></div>
           <div class="info_item"><span>制单日期:</span><span>{{func.replaceDate(orderInfo.crt_time)}}</span></div>
          <div class="info_item"><span>预计到货日期:</span><span>{{func.replaceDate(orderInfo.arrive_time)}}</span></div>
@@ -101,7 +101,7 @@ export default {
       oaInfo: [],
       type: null,
       purchaseColumus:[
-        { title: '项目名称', key: '', align: 'center', minWidth: 92 },
+        { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 92 },
         { title: '物料分类', key: 'type_title', align: 'center', minWidth: 92 },
         { title: '物料名称', key: 'title', align: 'center', minWidth: 92 },
         { title: '物料规格', key: '', align: 'center', minWidth: 92, slot: "materiel_specs"},
@@ -188,19 +188,19 @@ export default {
   },
     methods: {
     handleSet () { },
-    approval (status) {
-      let params = {
-        status,
-        type: this.type,
-        oa_order_no: this.$route.query.oa_order_no
-      }
-      this.axios.post('/api/order_price_oa_pull', params).then(res => {
-        if (res.code == 200) {
-          this.$Message.success(res.msg || '无提示')
-          // this.goback()
-        }
-      })
-    },
+    // approval (status) {
+    //   let params = {
+    //     status,
+    //     type: this.type,
+    //     oa_order_no: this.$route.query.oa_order_no
+    //   }
+    //   this.axios.post('/api/order_price_oa_pull', params).then(res => {
+    //     if (res.code == 200) {
+    //       this.$Message.success(res.msg || '无提示')
+    //       // this.goback()
+    //     }
+    //   })
+    // },
     goback () { this.$router.go(-1) },
     handleShowMore () {
       if (this.fullAreaList.length > 0) {

+ 15 - 15
src/views/BidSystem/ContractList/qualitytestingDetail.vue

@@ -2,12 +2,12 @@
   <div>
     <Toptitle title="详情">
       <slot name="titleButton">
-        <Button @click="approval(1)"
+        <!-- <Button @click="approval(1)"
                 type="success"
                 style="margin-right:10px;">通过</Button>
         <Button @click="approval(2)"
                 type="error"
-                style="margin-right:10px;">驳回</Button>
+                style="margin-right:10px;">驳回</Button> -->
         <Button @click="goback()"
                 type="primary"
                 style="margin-right:10px;">返回</Button>
@@ -158,19 +158,19 @@ export default {
   },
   methods: {
     handleSet () { },
-    approval (status) {
-      let params = {
-        status,
-        type: this.type,
-        oa_order_no: this.$route.query.oa_order_no
-      }
-      this.axios.post('/api/order_price_oa_pull', params).then(res => {
-        if (res.code == 200) {
-          this.$Message.success(res.msg || '无提示')
-          // this.goback()
-        }
-      })
-    },
+    // approval (status) {
+    //   let params = {
+    //     status,
+    //     type: this.type,
+    //     oa_order_no: this.$route.query.oa_order_no
+    //   }
+    //   this.axios.post('/api/order_price_oa_pull', params).then(res => {
+    //     if (res.code == 200) {
+    //       this.$Message.success(res.msg || '无提示')
+    //       // this.goback()
+    //     }
+    //   })
+    // },
     goback () { this.$router.go(-1) },
     handleShowMore () {
       if (this.fullAreaList.length > 0) {

+ 16 - 16
src/views/BidSystem/ContractList/requisitionDetail.vue

@@ -2,12 +2,12 @@
   <div>
     <Toptitle title="详情">
       <slot name="titleButton">
-        <Button @click="approval(1)"
+        <!-- <Button @click="approval(1)"
                 type="success"
                 style="margin-right:10px;">通过</Button>
         <Button @click="approval(2)"
                 type="error"
-                style="margin-right:10px;">驳回</Button>
+                style="margin-right:10px;">驳回</Button> -->
         <Button @click="goback()"
                 type="primary"
                 style="margin-right:10px;">返回</Button>
@@ -26,7 +26,7 @@
         <div class="info">
           <div class="info_item"><span>制单人:</span><span>{{orderInfo.nickname}}</span></div>
           <div class="info_item"><span>请购类型:</span><span>{{orderInfo.type_title}}</span></div>
-          <div class="info_item"><span>项目名称:</span><span>{{orderInfo.client_name}}</span></div>
+          <div class="info_item"><span>项目名称:</span><span>{{orderInfo.residential_name}}</span></div>
           <div class="info_item"><span>单据号:</span><span>{{orderInfo.purchase_order_apply_no}}</span></div>
           <div class="info_item"><span>制单日期:</span><span>{{func.replaceDate(orderInfo.crt_time)}}</span></div>
           <div class="info_item"><span>备注:</span><span>采购需要快点,生产部等着要</span></div>
@@ -168,19 +168,19 @@ export default {
   },
   methods: {
     handleSet () { },
-    approval (status) {
-      let params = {
-        status,
-        type: this.type,
-        oa_order_no: this.$route.query.oa_order_no
-      }
-      this.axios.post('/api/order_price_oa_pull', params).then(res => {
-        if (res.code == 200) {
-          this.$Message.success(res.msg || '无提示')
-          // this.goback()
-        }
-      })
-    },
+    // approval (status) {
+    //   let params = {
+    //     status,
+    //     type: this.type,
+    //     oa_order_no: this.$route.query.oa_order_no
+    //   }
+    //   this.axios.post('/api/order_price_oa_pull', params).then(res => {
+    //     if (res.code == 200) {
+    //       this.$Message.success(res.msg || '无提示')
+    //       // this.goback()
+    //     }
+    //   })
+    // },
     goback () { this.$router.go(-1) },
     handleShowMore () {
       if (this.fullAreaList.length > 0) {

+ 1 - 1
src/views/BidSystem/ProductDeOrder/list.vue

@@ -407,7 +407,7 @@ export default {
       this.getData(this.proxyObj);
     },
     async exportData() {
-      const res = await this.axios("/api/measure_orders_export", {
+      const res = await this.axios("/api/production_export", {
         params: { ...this.proxyObj },
       });
       if (res.code == 200) {

+ 17 - 5
src/views/ProcessRoute/edit.vue

@@ -55,11 +55,12 @@
       <div class="hierarchy" v-for="item of info.list" :key="item.name">
         <span>{{ item.name || item.title }}(多选):</span>
         <div v-for="_item in item.cld" class="radio-g" :key="_item.type_title">
+          <div class="tit_box">
           <span
             :class="['box-us', _item.show ? 'box-us-foc' : '']"
             @click="setBoxChange(item, _item)"
             >{{ _item.type_title }}</span
-          >
+          ></div><div class="radio-box">
           <div
             :class="['radio-us', __item.show ? 'radio-us-foc' : '']"
             v-for="__item in _item.list"
@@ -67,7 +68,7 @@
             :key="__item.id"
           >
             {{ __item.title }}
-          </div>
+          </div></div>
         </div>
         <!-- <div class="radio-g">
           <div @click="setRadioChange(item,_item)"
@@ -683,7 +684,11 @@ export default {
     display: flex;
     justify-content: flex-start;
     align-items: center;
-    flex-wrap: wrap;
+
+    .radio-box{
+      border-left: 1px solid  #dedede;
+      display: flex;
+      flex-wrap:wrap;
     .radio-us {
       background: #f4f5f7;
       padding: 5px 20px;
@@ -698,7 +703,9 @@ export default {
       color: #3764ff;
       background: #fff;
       border: 1px solid #3764ff;
-    }
+    }}
+    
+    .tit_box{
     .box-us {
       background: #f4f5f7;
       padding: 5px 20px;
@@ -708,12 +715,17 @@ export default {
       border-radius: 5px;
       border: 1px solid #dedede;
       cursor: pointer;
+      width: 100px;
+      display: inline-block;
+    text-align: center;
     }
     .box-us-foc {
       color: #3764ff;
       background: #fff;
       border: 1px solid #3764ff;
-    }
+      display: inline-block;
+    text-align: center;
+    }}
   }
 }
 .vertical-center-modal {

+ 195 - 34
src/views/PurchasingManage/InstockOrder/edit.vue

@@ -5,15 +5,21 @@
         <Button @click="handleReference(5,1)"
                 type="primary"
                 ghost
-                style="margin-right:10px;">参照采购单</Button>
+                style="margin-right:10px;"
+                v-show="!isCheck"
+                :disabled='$route.query.is_refer == 0?true:btn1_disable'>参照采购单</Button>
         <Button @click="handleReference(6,2)"
                 type="primary"
                 ghost
-                style="margin-right:10px;">参照到货单</Button>
+                style="margin-right:10px;"
+                v-show="!isCheck"
+                :disabled="$route.query.is_refer == 0?true:btn2_disable">参照到货单</Button>
         <Button @click="handleReference(7,3)"
                 type="primary"
                 ghost
-                style="margin-right:10px;">参照质检单</Button>
+                style="margin-right:10px;"
+                v-show="!isCheck"
+                :disabled="$route.query.is_refer == 0?true:btn3_disable">参照质检单</Button>
         <Button @click="goBack"
                 type="primary"
                 ghost
@@ -21,6 +27,7 @@
         <Button @click="postData"
                 type="primary"
                 ghost
+                v-show="!isCheck"
                 style="margin-right:10px;">确定</Button>
       </slot>
     </Toptitle>
@@ -30,24 +37,28 @@
         <FormItem label="项目名称:">
           <Input type="text"
                  size="small"
-                 v-model="searchData.client_name"
+                 v-model="searchData.residential_name"
+                 v-show="!isCheck"
                  style="width: 200px;margin-top:6px"
                  placeholder="项目名称">
           <span slot="append"
                 style="cursor:pointer;"
                 @click="showProjectModal=true">选择</span>
           </Input>
+          <span  v-show="isCheck">{{searchData.residential_name}}</span>
         </FormItem>
         <FormItem label="供应商名称:">
           <Input type="text"
                  size="small"
                  v-model="searchData.supply_title"
                  style="width: 200px;margin-top:6px"
+                 v-show="!isCheck"
                  placeholder="供应商名称">
           <span slot="append"
                 style="cursor:pointer;"
                 @click="showSupplierModal=true">选择</span>
           </Input>
+          <span v-show="isCheck">{{searchData.supply_title}}</span>
         </FormItem>
         <FormItem label="仓库:">
           <Select v-model="searchData.warehouse_id"
@@ -55,6 +66,7 @@
                   clearable
                   filterable
                   label-in-value
+                  v-show="!isCheck"
                   style="width: 200px">
             <Option v-for="(sitem) in warehouseList"
                     :key="sitem.id"
@@ -62,20 +74,24 @@
                     :value="sitem.id">
             </Option>
           </Select>
+           <span v-show="isCheck">{{searchData.warehouse_title}}</span>
         </FormItem>
         <FormItem label="单据号:">
           <Input type="text"
                  size="small"
                  readonly
+                 v-show="!isCheck"
                  v-model="searchData.order_in_no"
                  style="width: 200px"
                  placeholder="自动生成" />
+                  <span v-show="isCheck">{{searchData.order_in_no}}</span>
         </FormItem>
         <FormItem label="入库类型:">
           <Select v-model="searchData.type_id"
                   size="small"
                   clearable
                   filterable
+                  v-show="!isCheck"
                   label-in-value
                   style="width: 200px">
             <Option v-for="(sitem) in purchaseTypeList"
@@ -84,6 +100,7 @@
                     :value="sitem.id">
             </Option>
           </Select>
+           <span v-show="isCheck">{{searchData.type_id == 1 ?'采购入库':'库存入库'}}</span>
         </FormItem>
         <!-- <FormItem label="制单人:">
           <Input type="text"
@@ -96,15 +113,19 @@
           <DatePicker type="date"
                       size="small"
                       style="width: 200px"
+                      v-show="!isCheck"
                       placeholder="年/月/日"
                       v-model="searchData.crt_time"></DatePicker>
+                       <span v-show="isCheck">{{func.replaceDate(searchData.crt_time)}}</span>
         </FormItem>
         <FormItem label="备注:">
           <Input type="textarea"
                  size="small"
                  v-model="searchData.remark"
+                 v-show="!isCheck"
                  style="width: 200px"
                  placeholder="备注" />
+                  <span v-show="isCheck">{{searchData.remark}}</span>
         </FormItem>
       </Form>
     </div>
@@ -115,15 +136,41 @@
           <Button @click="showModal=true"
                   type="primary"
                   size="small"
-                  style="margin-left:10px;">选择物料</Button>
+                  style="margin-left:10px;"
+                  v-show="!isCheck"
+                  :disabled="$route.query.is_refer == 1?true:btn_disable">选择物料</Button>
         </div>
         <div class="content_table_btn_right">
         </div>
       </div>
       <Table :columns="tableColumns"
              border
-             :data="tableData">
-
+             :data="tableData"
+             show-summary :summary-method="handleSummary"
+             >
+            <template slot="numberSet" slot-scope="{row , index }">
+           <Tooltip
+            placement="left"
+            @on-popper-show="handleToolShow(index, row)"
+          >
+            <div slot="content">
+              <div>
+                <div v-for="(_item,_index) in warehouse" :key="_index">
+                  {{_item.warehouse_title}}:{{_item.num}}
+                </div>
+              </div>
+            </div>
+            <Input
+              type="text"
+              v-show="!isCheck"
+              size="small"
+              v-model="tableData[index].num"
+              placeholder="数量"
+            >
+            </Input>
+            <span v-show="isCheck">{{ tableData[index].num }}</span>
+          </Tooltip>
+        </template>
         <template slot="setSlot"
                   slot-scope="{row,index}">
           <a style="margin:0 5px"
@@ -304,9 +351,14 @@ export default {
   data () {
     // 这里存放数据
     return {
+      isCheck:false,
+      btn1_disable:false,
+      btn_disable:false,
+      btn2_disable:false,
+      btn3_disable:false,
       fax_modify: '',
       searchData: {
-        client_name: ''
+        residential_name: ''
       },
       modalProjectData: {
         title: '',
@@ -364,30 +416,30 @@ export default {
         },
         { title: '计量单位', key: 'unit', align: 'center', minWidth: 100 },
         {
-          title: '入库数量', key: 'num', align: 'center', minWidth: 120,
-          render: (h, params) => {
-            const { row, index } = params
-            const currentRow = JSON.parse(JSON.stringify(this.tableData[index]))
-            return this.$route.query.type == 2 ? h('span', {}, currentRow.num)
-              : h('Input', {
-                props: {
-                  value: currentRow.num,
-                  type: 'text'
-                },
-                on: {
-                  'on-change': (e) => {
-                    currentRow.num = e.target.value
-                    // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
-                    // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
-                    // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
-                    this.tableData.splice(index, 1, currentRow);
-                  }
-                }
-              })
-          }
+          title: '数量', key: 'num', align: 'center', minWidth: 120,slot:"numberSet"
+          // render: (h, params) => {
+          //   const { row, index } = params
+          //   const currentRow = JSON.parse(JSON.stringify(this.tableData[index]))
+          //   return this.$route.query.type == 2 ? h('span', {}, currentRow.num)
+          //     : h('Input', {
+          //       props: {
+          //         value: currentRow.num,
+          //         type: 'text'
+          //       },
+          //       on: {
+          //         'on-change': (e) => {
+          //           currentRow.num = e.target.value
+          //           // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
+          //           // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
+          //           // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
+          //           this.tableData.splice(index, 1, currentRow);
+          //         }
+          //       }
+          //     })
+          // }
         },
         {
-          title: '入库价格', key: 'total_price', align: 'center', minWidth: 120,
+          title: '单价', key: 'total_price', align: 'center', minWidth: 120,
           render: (h, params) => {
             const { row, index } = params
             const currentRow = JSON.parse(JSON.stringify(this.tableData[index]))
@@ -407,8 +459,20 @@ export default {
               })
           }
         },
+         {
+          title: "金额", key: "total", align: "center", minWidth: 100,
+           render: (h, params) => {
+            const { row, index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.tableData[index])
+            );
+            
+            return  h("span", {},currentRow.total_price&&currentRow.num?currentRow.total_price*currentRow.num:0)
+          }
+        },
         { title: '操作', key: 'code', align: 'center', minWidth: 100, slot: 'setSlot' },
       ],
+      is_refer:'',
       tableData: [],
       showModal: false,
       showProjectModal: false,
@@ -449,7 +513,7 @@ export default {
             ])
           }
         },
-        { title: '项目名称', key: 'client_name', align: 'center', minWidth: 100 },
+        { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 100 },
         { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 80, slot: 'basicTypeSet', },
         {
           title: '创建时间', key: 'crt_time', align: 'center', minWidth: 110,
@@ -545,10 +609,14 @@ export default {
       warehouseList: [],
       purchaseTypeList: [],
       warningList: [],
+      warehouse:'',
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   created () {
+    this.$route.query.type == 2
+      ? (this.isCheck = true)
+      : (this.isCheck = false);
     // 获取采购类型
     this.axios({ method: 'get', url: '/api/basic_order_in_list', }).then((res) => { this.purchaseTypeList = res.data.data }).catch((err) => { });
     // 获取基础物料类型
@@ -577,6 +645,79 @@ export default {
     }
   },
   methods: {
+     handleToolShow(index, row) {
+        if (this.warehouse) {
+        return
+      } else {
+        this.axios
+          .get("/api/warehouse_stock_number", {
+            params: {
+              material_id: row.material_id,
+              material_detail_id: row.material_detail_id,
+            },
+          })
+          .then((res) => {
+              this.warehouse= res.data
+          });
+      }
+      
+      // this.warehouse.num = this.warehouseTotal[index].num;
+      // this.warehouse.warehouseName = this.warehouseTotal[index].warehouseName
+      
+    },
+     handleSummary ({ columns, data }) {
+                const sums = {};
+                columns.forEach((column, index) => {
+                    const key = column.key;
+                    if (index === 0) {
+                        sums[key] = {
+                            key,
+                            value: '总价'
+                        };
+                        return;
+                    }
+                    let val = data;
+                    for(let i in val){
+                      val[i].total = val[i].total_price*val[i].num;
+                    }
+                    const values = val.map(item => Number(item[key]));
+                    if (index === 6) {
+                        const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v 
+                        };
+                    }else if(index===4){
+                       const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v 
+                        };
+                    }
+                     else {
+                        sums[key] = {
+                            key,
+                            value: ''
+                        };
+                    }
+                });
+
+                return sums;
+            },
     initData (order_in_no) {
       this.axios({
         method: 'get',
@@ -587,6 +728,7 @@ export default {
         const data = JSON.parse(JSON.stringify(res.data))
         delete data.list
         this.searchData = data
+        console.log(this.searchData)
       }).catch((err) => { });
     },
     postData () {
@@ -606,7 +748,8 @@ export default {
           url: '/api/warehouse_order_in_add',
           data: {
             ...obj,
-            list: this.tableData
+            list: this.tableData,
+            is_refer:this.is_refer
           }
         }).then((res) => {
           this.$Message.success(res.msg)
@@ -620,7 +763,8 @@ export default {
           data: {
             order_in_no: this.$route.query.order_in_no,
             ...obj,
-            list: this.tableData
+            list: this.tableData,
+            is_refer:this.is_refer
           }
         }).then((res) => {
           this.$Message.success(res.msg)
@@ -635,6 +779,19 @@ export default {
         title, refer_type,
         then: (result, data) => {
           this.tableData = [...this.tableData, ...result]
+          this.is_refer = 1
+          this.btn_disable = true
+          if(type === 5){
+            this.btn2_disable = true
+            this.btn3_disable = true
+          }
+          else if(type === 6){
+            this.btn1_disable = true
+            this.btn3_disable = true
+          }else{
+            this.btn1_disable = true
+            this.btn2_disable = true
+          }
         }
       })
     },
@@ -647,6 +804,10 @@ export default {
         element.type == 0
       });
       this.tableData = [...this.tableData, ...this.modalData.selectedData]
+      this.is_refer = 0
+      this.btn1_disable = true
+      this.btn2_disable = true
+      this.btn3_disable = true
     },
     handleTreeSlect (array, row) {
       row.id && this.axios({
@@ -722,7 +883,7 @@ export default {
     },
     goBack () { this.$router.go(-1) },
     handleProjectSelect () {
-      this.searchData.client_name = this.currentChoose.client_name
+      this.searchData.residential_name = this.currentChoose.residential_name
       this.searchData.order_no = this.currentChoose.order_no
     },
     handleSupplierSelect () {

+ 8 - 6
src/views/PurchasingManage/InstockOrder/list.vue

@@ -163,7 +163,7 @@ export default {
       },
       tableColumns: [
         { title: '订单号', key: 'order_in_no', align: 'center', minWidth: 140 },
-        { title: '项目名称', key: 'client_name', align: 'center', minWidth: 140 },
+        { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 140 },
         {
           title: '入库类型', key: 'lock', align: 'center', minWidth: 120,
           render: (h, params) => {
@@ -229,6 +229,7 @@ export default {
       }).then((res) => {
         this.tableData = res.data.data
         this.total = res.data.total
+        // console.log(res)
       }).catch((err) => { });
     },
     handleSet (type, row, index) {
@@ -236,9 +237,9 @@ export default {
       switch (type) {
         case 1:
         case 2:
-          this.handleGoPage(type, row.order_in_no)
+          this.handleGoPage(type, row.order_in_no,row.is_refer)
         case 3:
-          this.handleGoPage(type, row.order_in_no)
+          this.handleGoPage(type, row.order_in_no,row.is_refer)
           break;
         case 4:
           this.$Modal.confirm({
@@ -272,7 +273,7 @@ export default {
                   state: row.state + 1
                 }
               }).then((res) => {
-                this.$Message.success(res.msg)
+                // this.$Message.success(res.msg)
                 this.initData()
               }).catch((err) => { });
             },
@@ -281,12 +282,13 @@ export default {
           break;
       }
     },
-    handleGoPage (type, order_in_no) {
+    handleGoPage (type, order_in_no,is_refer) {
       this.$router.push({
         path: '/cms/PurchasingManage/InstockOrder/edit',
         query: {
           type,
-          order_in_no
+          order_in_no,
+          is_refer
         }
       })
     },

+ 112 - 12
src/views/PurchasingManage/OutstockOrder/edit.vue

@@ -7,14 +7,17 @@
           type="primary"
           ghost
           style="margin-right: 10px"
+          :disabled='btn1_disable'
+          v-show="!isCheck"
           >参照入库单</Button
         >
         <Button
           @click="handleReference(9, 4)"
-          disabled
+          :disabled="btn2_disable"
           type="primary"
           ghost
           style="margin-right: 10px"
+           v-show="!isCheck"
           >参照派工单</Button
         >
         <!-- <Button @click="handleReference(4)"
@@ -29,6 +32,7 @@
           type="primary"
           ghost
           style="margin-right: 10px"
+           v-show="!isCheck"
           >确定</Button
         >
       </slot>
@@ -39,9 +43,10 @@
           <Input
             type="text"
             size="small"
-            v-model="searchData.client_name"
+            v-model="searchData.residential_name"
             style="width: 200px; margin-top: 6px"
             placeholder="项目名称"
+             v-show="!isCheck"
           >
             <span
               slot="append"
@@ -50,6 +55,7 @@
               >选择</span
             >
           </Input>
+          <span v-show="isCheck">{{searchData.residential_name}}</span>
         </FormItem>
         <FormItem label="供应商名称:">
           <Input
@@ -57,6 +63,7 @@
             size="small"
             v-model="searchData.title"
             style="width: 200px; margin-top: 6px"
+            v-show="!isCheck"
             placeholder="供应商名称"
           >
             <span
@@ -66,6 +73,7 @@
               >选择</span
             >
           </Input>
+          <span v-show="isCheck">{{searchData.title}}</span>
         </FormItem>
         <FormItem label="单据号:">
           <Input
@@ -73,9 +81,11 @@
             size="small"
             readonly
             v-model="searchData.order_out_no"
+            v-show="!isCheck"
             style="width: 200px"
             placeholder="自动生成"
           />
+          <span v-show="isCheck">{{searchData.order_out_no}}</span>
         </FormItem>
         <!-- <FormItem label="制单人:">
           <Input type="text"
@@ -90,17 +100,21 @@
             size="small"
             style="width: 200px"
             placeholder="年/月/日"
+            v-show="!isCheck"
             :value="func.replaceDate(searchData.crt_time)"
           ></DatePicker>
+          <span v-show="isCheck">{{func.replaceDate(searchData.crt_time)}}</span>
         </FormItem>
         <FormItem label="备注:">
           <Input
             type="textarea"
             size="small"
             v-model="searchData.remark"
+            v-show="!isCheck"
             style="width: 200px"
             placeholder="备注"
           />
+          <span v-show="isCheck">{{searchData.remark}}</span>
         </FormItem>
       </Form>
     </div>
@@ -113,12 +127,14 @@
             type="primary"
             size="small"
             style="margin-left: 10px"
+            :disabled="btn_disable"
+            v-show="!isCheck"
             >选择物料</Button
           >
         </div>
         <div class="content_table_btn_right"></div>
       </div>
-      <Table :columns="tableColumns" border :data="tableData">
+      <Table :columns="tableColumns" border :data="tableData" show-summary :summary-method="handleSummary">
         <template slot="setSlot" slot-scope="{ row, index }">
           <a
             style="margin: 0 5px"
@@ -336,9 +352,14 @@ export default {
   data() {
     // 这里存放数据
     return {
+      isCheck:false,
+      is_refer:'',
+      btn_disable:false,
+      btn1_disable:false,
+      btn2_disable:false,
       fax_modify: "",
       searchData: {
-        client_name: "",
+        residential_name: "",
       },
       modalProjectData: {
         title: "",
@@ -410,7 +431,7 @@ export default {
         },
         { title: "计量单位", key: "unit", align: "center", minWidth: 100 },
         {
-          title: "出库数量",
+          title: "数量",
           key: "num",
           align: "center",
           minWidth: 120,
@@ -437,7 +458,7 @@ export default {
           },
         },
         {
-          title: "出库价格",
+          title: "单价",
           key: "total_price",
           align: "center",
           minWidth: 120,
@@ -463,6 +484,17 @@ export default {
           },
         },
         {
+          title: "金额", key: "total", align: "center", minWidth: 100,
+           render: (h, params) => {
+            const { row, index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.tableData[index])
+            );
+            
+            return  h("span", {},currentRow.total_price&&currentRow.num?currentRow.total_price*currentRow.num:0)
+          }
+        },
+        {
           title: "操作",
           key: "code",
           align: "center",
@@ -515,7 +547,7 @@ export default {
         },
         {
           title: "项目名称",
-          key: "client_name",
+          key: "residential_name",
           align: "center",
           minWidth: 100,
         },
@@ -638,6 +670,7 @@ export default {
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   created() {
+     this.$route.query.type == 2 ? this.isCheck = true : this.isCheck = false
     // 获取基础物料类型
     this.axios({ method: "get", url: "/api/basics_material_index_level" })
       .then((res) => {
@@ -678,6 +711,59 @@ export default {
     }
   },
   methods: {
+     handleSummary ({ columns, data }) {
+                const sums = {};
+                columns.forEach((column, index) => {
+                    const key = column.key;
+                    if (index === 0) {
+                        sums[key] = {
+                            key,
+                            value: '总价'
+                        };
+                        return;
+                    }
+                    let val = data;
+                    for(let i in val){
+                      val[i].total = val[i].total_price*val[i].num;
+                    }
+                    const values = val.map(item => Number(item[key]));
+                    if (index === 6) {
+                        const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v 
+                        };
+                    }else if(index===4){
+                       const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v 
+                        };
+                    }
+                     else {
+                        sums[key] = {
+                            key,
+                            value: ''
+                        };
+                    }
+                });
+
+                return sums;
+            },
     initData(order_out_no) {
       this.axios({
         method: "get",
@@ -717,11 +803,13 @@ export default {
           data: {
             ...obj,
             list: this.tableData,
+            is_refer:this.is_refer
           },
-        })
-          .then((res) => {
-            this.$Message.success(res.msg);
-            this.goBack();
+        }).then((res) => {
+          if(res.msg !== '请选择供应商'){
+              this.$Message.success(res.msg);
+            this.goBack()
+          }
           })
           .catch((err) => {});
       } else {
@@ -733,6 +821,7 @@ export default {
             order_out_no: this.$route.query.order_out_no,
             ...obj,
             list: this.tableData,
+            is_refer:this.is_refer
           },
         })
           .then((res) => {
@@ -750,6 +839,13 @@ export default {
         refer_type,
         then: (result, data) => {
           this.tableData = [...this.tableData, ...result];
+          this.btn_disable = true
+          this.is_refer = 1
+          if(type === 8){
+            this.btn2_disable = true
+          }else{
+            this.btn1_disable = true
+          }
         },
       });
     },
@@ -762,6 +858,10 @@ export default {
         element.type == 0;
       });
       this.tableData = [...this.tableData, ...this.modalData.selectedData];
+           this.btn1_disable = true
+      this.btn2_disable = true
+      this.is_refer = 0
+      
     },
     changeModalSize(e) {
       this.modal_page_size = e;
@@ -847,7 +947,7 @@ export default {
       this.$router.go(-1);
     },
     handleProjectSelect() {
-      this.searchData.client_name = this.currentChoose.client_name;
+      this.searchData.residential_name = this.currentChoose.residential_name;
       this.searchData.order_no = this.currentChoose.order_no;
     },
     handleSupplierSelect() {

+ 6 - 4
src/views/PurchasingManage/OutstockOrder/list.vue

@@ -163,7 +163,7 @@ export default {
       },
       tableColumns: [
         { title: '订单号', key: 'order_out_no', align: 'center', minWidth: 140 },
-        { title: '项目名称', key: 'client_name', align: 'center', minWidth: 140 },
+        { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 140 },
         {
           title: '出库类型', key: 'lock', align: 'center', minWidth: 120,
           render: (h, params) => {
@@ -228,6 +228,7 @@ export default {
           page_size: this.pageSize
         }
       }).then((res) => {
+        console.log(res)
         this.tableData = res.data.data
         this.total = res.data.total
       }).catch((err) => { });
@@ -238,7 +239,7 @@ export default {
         case 1:
         case 2:
         case 3:
-          this.handleGoPage(type, row.order_out_no)
+          this.handleGoPage(type, row.order_out_no, row.is_refer)
           break;
         case 4:
           this.$Modal.confirm({
@@ -283,12 +284,13 @@ export default {
           break;
       }
     },
-    handleGoPage (type, order_out_no) {
+    handleGoPage (type, order_out_no,is_refer) {
       this.$router.push({
         path: '/cms/PurchasingManage/OutstockOrder/edit',
         query: {
           type,
-          order_out_no
+          order_out_no,
+          is_refer
         }
       })
     },

+ 9 - 8
src/views/PurchasingManage/PurchasingOrder/edit.vue

@@ -7,7 +7,7 @@
                 v-show="!isCheck"
                 ghost
                 style="margin-right:10px;"
-                :disabled="btn1_disable">参照请购单</Button>
+                :disabled="$route.query.is_refer == 1?true:btn1_disable">参照请购单</Button>
         <Button @click="goBack"
                 type="primary"
                 ghost
@@ -26,14 +26,14 @@
           <Input type="text"
                  size="small"
                  v-show="!isCheck"
-                 v-model="searchData.client_name"
+                 v-model="searchData.residential_name"
                  style="width: 200px;margin-top:6px"
                  placeholder="项目名称">
           <span slot="append"
                 style="cursor:pointer;"
                 @click="showProjectModal=true">选择</span>
           </Input>
-          <span v-show="isCheck">{{searchData.client_name}}</span>
+          <span v-show="isCheck">{{searchData.residential_name}}</span>
         </FormItem>
         <FormItem label="供应商名称:">
           <Input type="text"
@@ -129,7 +129,7 @@
                   type="primary"
                   size="small"
                   style="margin-left:10px;"
-                  :disabled="btn_disable">选择物料</Button>
+                  :disabled="$route.query.is_refer == 0?true:btn_disable">选择物料</Button>
         </div>
         <div class="content_table_btn_right"
              v-show="!isCheck">
@@ -333,7 +333,7 @@ export default {
       btn1_disable:false,
       fax_modify: '',
       searchData: {
-        client_name: ''
+       residential_name: ''
       },
       purchaseTypeList: [],
       modalProjectData: {
@@ -381,7 +381,7 @@ export default {
         tableData: [{}]
       },
       tableColumns: [
-        { title: '项目名称', key: 'client_name', align: 'center', minWidth: 140 },
+        { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 140 },
         { title: '物料分类', key: 'type_title', align: 'center', minWidth: 140 },
         { title: '物料名称', key: 'title', align: 'center', minWidth: 140 },
         {
@@ -784,7 +784,8 @@ export default {
           data: {
             purchase_order_no: this.$route.query.purchase_order_no,
             ...obj,
-            list: this.tableData
+            list: this.tableData,
+            is_refer:this.table_state
           }
         }).then((res) => {
           if (res.code == 200) {
@@ -885,7 +886,7 @@ export default {
     },
     goBack () { this.$router.go(-1) },
     handleProjectSelect () {
-      this.searchData.client_name = this.currentChoose.client_name
+      this.searchData.residential_name = this.currentChoose.residential_name
       this.searchData.order_no = this.currentChoose.order_no
     },
     handleSupplierSelect () {

+ 6 - 5
src/views/PurchasingManage/PurchasingOrder/list.vue

@@ -173,7 +173,7 @@ export default {
       purchaseTypeList: [],
       tableColumns: [
         { title: '订单号', key: 'purchase_order_no', align: 'center', minWidth: 140 },
-        { title: '项目名称', key: 'client_name', align: 'center', minWidth: 140 },
+        { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 140 },
         { title: '采购类型', key: 'type_title', align: 'center', minWidth: 140 },
         { title: '供应商名称', key: 'supply_title', align: 'center', minWidth: 140 },
         {
@@ -189,7 +189,7 @@ export default {
           title: '审批状态', key: 'state', align: 'center', minWidth: 140,
           render: (h, params) => {
             const { row } = params
-            const text = row.state == 0 ? '未审核' : row.state == 1 ? '审核中' : row.state == 2 ? '已审核' : '驳回'
+            const text = row.state == 0 ? '未提交' : row.state == 1 ? '审核中' : row.state == 2 ? '通过' : '驳回'
             return h('span', {}, text)
           }
         },
@@ -256,7 +256,7 @@ export default {
         case 1:
         case 2:
         case 3:
-          this.handleGoPage(type, row.purchase_order_no)
+          this.handleGoPage(type, row.purchase_order_no,row.is_refer)
           break;
         case 4:
           this.$Modal.confirm({
@@ -299,12 +299,13 @@ export default {
           break;
       }
     },
-    handleGoPage (type, purchase_order_no) {
+    handleGoPage (type, purchase_order_no,is_refer) {
       this.$router.push({
         path: '/cms/PurchasingManage/PurchasingOrder/edit',
         query: {
           type,
-          purchase_order_no
+          purchase_order_no,
+         is_refer
         }
       })
     },

+ 5 - 9
src/views/PurchasingManage/RequisitionOrder/edit.vue

@@ -148,7 +148,7 @@
           >
             <div slot="content">
               <div>
-                <div v-for="(_item,_index) in row.warehouse_list" :key="_index">
+                <div v-for="(_item,_index) in warehouse" :key="_index">
                   {{_item.warehouse_title}}:{{_item.num}}
                 </div>
               </div>
@@ -567,10 +567,7 @@ export default {
         },
       ],
       warehouseTotal: [],
-      warehouse: {
-        warehouse_title: "",
-        num: "",
-      },
+      warehouse: '',
       isCheck: false,
       warningList: [],
     };
@@ -620,7 +617,8 @@ export default {
   },
   methods: {
     handleToolShow(index, row) {
-      if (row.warehouse_title) {
+      if (this.warehouse) {
+        return
       } else {
         this.axios
           .get("/api/warehouse_stock_number", {
@@ -630,13 +628,11 @@ export default {
             },
           })
           .then((res) => {
-            row.warehouse_list = []
-            row.warehouse_list = res.data
+              this.warehouse= res.data
           });
       }
       // this.warehouse.num = this.warehouseTotal[index].num;
       // this.warehouse.warehouseName = this.warehouseTotal[index].warehouseName
-      this.warehouse = this.warehouseTotal[index];
     },
     initData() {
       this.axios({

+ 2 - 1
src/views/PurchasingManage/RequisitionOrder/list.vue

@@ -166,7 +166,7 @@ export default {
       purchaseTypeList: [],
       tableColumns: [
         { title: '订单号', key: 'purchase_order_apply_no', align: 'center', minWidth: 140 },
-        { title: '项目名称', key: 'client_name', align: 'center', minWidth: 140 },
+        { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 140 },
         { title: '请购类型', key: 'type_title', align: 'center', minWidth: 140 },
         {
           title: '订单状态', key: 'lock', align: 'center', minWidth: 140,
@@ -223,6 +223,7 @@ export default {
           ...this.searchData
         }
       }).then((res) => {
+        console.log(res)
         this.tableData = res.data.data
         this.total = res.data.total
       }).catch((err) => { });

+ 0 - 0
src/views/Warehouse/Dispatch/detail.vue → src/views/Warehouse/Approval/detail.vue


+ 261 - 0
src/views/Warehouse/Approval/list.vue

@@ -0,0 +1,261 @@
+<template>
+  <div>
+    <FullPage title='审批列表'
+              :list='list'
+              @init='init'
+              :loading='loading'
+              @searchData='init'
+              @changePage='changePage'
+              @changeSize='changeSize'
+              @selectTable='selectTable'
+              :tableColums='tableColums'
+              :tableData='tableData'
+              :pageIndex='pageIndex'
+              :total='total'>
+      <div slot='titleButton'>
+        <Button type="error"
+                @click="approved(2)"
+                style="margin-right:10px;"
+                ghost>批量驳回审批</Button>
+        <Button type="success"
+                @click="approved(1)"
+                style="margin-right:10px;"
+                ghost>批量通过审批</Button>
+      </div>
+      <template slot='set'
+                slot-scope='{row}'>
+        <div>
+          <a v-if='persimissionData["订单详情"]||persimissionData.all'
+
+             style="margin:0 5px">详情</a>
+          <!-- <a v-if='persimissionData["审批详情"]||persimissionData.all'
+             @click="goDetails(row)"
+             style="margin:0 5px">审批详情</a> -->
+          <a @click="singleApproved(2,row)"
+             style="margin:0 5px;color:red"
+             v-if="row.state == 0">驳回</a>
+          <a @click="singleApproved(1,row)"
+             style="margin:0 5px;color:green"
+             v-if="row.state == 0 ">通过</a>
+        </div>
+      </template>
+    </FullPage>
+  </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+export default {
+  data () {
+    return {
+      list: [
+        { title: '订单号', name: 'Input', value: '', serverName: 'oa_order_no', placeholder: '请输入订单号' },
+        { title: '项目名称', name: 'Input', serverName: 'residential_name', value: '', placeholder: '请输入项目名称' },
+        { title: '提交人', name: 'Input', serverName: 'nickname', value: '', placeholder: '请选择提交人' },
+        {
+          title: '审批状态', name: 'Select', placeholder: '请选择', value: 0, serverName: 'state',
+          option: [
+            { label: '审核中', value: 0 },
+            { label: '通过', value: 1 },
+            { label: '驳回', value: 2 },
+            // { label: '取消', value: 3 },
+          ]
+        },
+        {
+          title: '审批类型', name: 'Select', serverName: 'type', placeholder: '请选择', value: '',
+          option: [
+            { label: '入库', value: 1 },
+            { label: '出库', value: 2 },
+          ]
+        },
+      
+        // { title: '审批时间', start_server: 'start_time', end_server: 'end_time', name: 'Input', start_value: '', end_value: '', isDate: true, start_placeholder: '开始日期', end_placeholder: '结束日期', },
+      ],
+      tableColums: [
+        { type: 'selection', align: 'center', fixed: 'left', minWidth: 100, },
+        { title: '订单号', align: 'center', key: 'oa_order_no', width: '180' },
+        { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 100 },
+        // { title: '订单流水号', align: 'center', key: 'oa_order_no', minWidth: 200 },
+        // {title:'订单类型',align:'center',key:'show_order_type',minWidth:100,
+        //     render:(h,params)=>h('span',{},params.row.order_type == 1 ? '工装' : '家装')
+        // },
+        // { title: '客户', align: 'center', key: 'client_name', minWidth: 100 },
+        // { title: '手机号', align: 'center', key: 'mobile', minWidth: 150 },
+        {
+          title: '审批类型', align: 'center', minWidth: 100,
+          render (h, params) {
+            return h('span', {}, params.row.type == 1 ? '入库' : '出库')
+          }
+        },
+        { title: '提交人', align: 'center', key: 'nickname', minWidth: 100 },
+        {
+          title: '审批状态', align: 'center', key: 'show_state', minWidth: 100,
+          render (h, params) {
+            return h('span', {
+              props: {},
+              style: {
+                color: params.row.state == 0 ? '#FFA141' : (params.row.state == 1 ? '#32C800' : '#FF5E5C')
+              }
+            }, params.row.state == 0 ? '审核中' : (params.row.state == 1 ? '通过' : (params.row.state == 2 ? '驳回' : '取消')))
+          }
+        },
+        {
+          title: '提交日期', align: 'center', key: 'show_crt_time', minWidth: 200,
+          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.crt_time * 1))
+        },
+        // { title: '创建人员', align: 'center', key: 'nickname', minWidth: 100 },
+        // {
+        //   title: '审批开始时间', align: 'center', key: 'show_crt_time', minWidth: 200,
+        //   render: (h, params) => h('span', {}, this.func.replaceDate(params.row.crt_time * 1))
+        // },
+        // {
+        //   title: '审批结束时间', align: 'center', key: 'show_upd_time', minWidth: 200,
+        //   render: (h, params) => h('span', {}, params.row.upd_time ? this.func.replaceDate(params.row.upd_time * 1) : '')
+        // },
+        // { title: '备注', align: 'center', key: 'remark', minWidth: 200 },
+        { title: '操作', align: 'center', slot: 'set', fixed: 'right', width: '220' },
+      ],
+      tableData: [],
+      pageIndex: 1,
+      total: 0,
+      pageSize: 10,
+      loading: false,
+      proxyObj: {},
+      selectIds: [],
+      currency_type: null,
+    }
+  },
+  created () {
+    this.currency_type = this.$route.query.id;
+  },
+  computed: {
+    ...mapState(['persimissionData'])
+  },
+  watch: {
+    $route (to) {
+      this.id = to.query.id;
+      this.proxyObj.id = this.id
+      this.getData(this.proxyObj)
+      this.currency_type = to.query.id
+    }
+  },
+  methods: {
+    init (row) {
+      this.pageIndex = 1
+      row.page_index = this.pageIndex;
+      row.page_size = this.pageSize
+      this.proxyObj = row;
+      this.getData(row)
+    },
+    getData (row) {
+      this.loading = true;
+      this.axios('/api/warehouse_oa_list', { params: row }).then(res => {
+        this.loading = false;
+        this.tableData = res.data.data;
+        this.total = res.data.total;
+      })
+    },
+    changePage (e) {
+      this.pageIndex = e;
+      this.proxyObj.page_index = this.pageIndex;
+      this.getData(this.proxyObj);
+    },
+    // goPage (row) {
+    //   row.type == 1 ? this.$router.push({
+    //     // /cms/ordermannage/businessorderlist/details
+    //     // path:'/cms/ordermannage/businessorderlist/decorationlist',
+    //     path: '/cms/BidSystem/ContractList/requisitionDetail',
+    //     query: {
+    //       oa_order_no: row.oa_order_no,
+    //       order_no: row.order_no,
+    //       type: row.type,
+    //       state: row.state,
+    //     }
+    //   }) :row.type == 2 ? this.$router.push({
+    //     path: '/cms/BidSystem/ContractList/purchaseDetail',
+    //     query: {
+    //       oa_order_no: row.oa_order_no,
+    //       order_no: row.order_no,
+    //       type: row.type,
+    //       state: row.state,
+    //     }
+    //   }) : row.type == 3 ? this.$router.push({
+    //     path: '/cms/BidSystem/ContractList/arrivalDetail',
+    //     query: {
+    //        oa_order_no: row.oa_order_no,
+    //       order_no: row.order_no,
+    //       type: row.type,
+    //       state: row.state,
+    //     }
+    //      }) :  this.$router.push({
+    //     path: '/cms/BidSystem/ContractList/qualitytestingDetail',
+    //     query: {
+    //       oa_order_no: row.oa_order_no,
+    //       order_no: row.order_no,
+    //       type: row.type,
+    //       state: row.state,
+    //     }
+    //     })
+    // },
+    goDetails (row) {
+      this.$router.push({
+        path: '/cms/approval/examine',
+        query: {
+          oa_order_no: row.oa_order_no
+        }
+      })
+    },
+    changeSize (e) {
+      this.pageSize = e;
+      this.proxyObj.page_size = this.page_size;
+      this.getData(this.proxyObj)
+    },
+    approved (n) {
+      if (this.selectIds.length < 1) {
+        return this.$Message.warning('请至少选择一项')
+      }
+      this.confirmDelete({
+        content: n == 1 ? '是否通过此订单审核?' : '是否驳回此订单审核',
+        title: n == 1 ? '审批通过' : '驳回审批',
+        type: n == 1 ? 'primary' : 'error',
+        then: () => {
+          
+          this.select_post(n, this.selectIds)
+        },
+        cancel: () => { }
+      })
+    },
+    singleApproved (n, row) {
+      this.selectIds = [row.oa_order_no]
+      this.approved(n)
+    },
+    selectTable (e) {
+      this.selectIds = e.reduce((pre, cur) => pre.concat([cur.oa_order_no]), [])
+      console.log('selectIds :>> ', this.selectIds);
+    },
+    select_post (state, arr) {//state(1:通过|2:驳回)
+      let params = { oa_order_no: arr.join(','), state: state }
+      console.log(params);
+      this.axios.post('/api/warehouse_oa_check', params).then(res => {
+        if (res.code == 200) {
+          // this.$Message.success(res.msg || '无提示')
+          this.getData(this.proxyObj)
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.nav {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.item-attr {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+}
+</style>

+ 0 - 51
src/views/Warehouse/Dispatch/list.vue

@@ -1,51 +0,0 @@
-<template>
-  <div>
-DispatchList
-  </div>
-</template>
-
-<script>
-// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-// 例如:import 《组件名称》 from '《组件路径》';
-
-export default {
-  name:'DispatchList',
-  components:{
-    
-  },
-  props:{},
-// import引入的组件需要注入到对象中才能使用
-  data () {
-    // 这里存放数据
-    return {
-
-    }
-  },
-// 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-
-  },
-// 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-
-  },
-  methods: {
-
-  },
-// 监听属性 类似于data概念
-computed: {},
-// 监控data中的数据变化
-watch: {},
-beforeCreate () { }, // 生命周期 - 创建之前
-beforeMount () { }, // 生命周期 - 挂载之前
-beforeUpdate () { }, // 生命周期 - 更新之前
-updated () { }, // 生命周期 - 更新之后
-beforeDestroy () { }, // 生命周期 - 销毁之前
-destroyed () { }, // 生命周期 - 销毁完成
-activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-
-<style lang='scss' scoped>
-
-</style>