瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

001295 1 年之前
父節點
當前提交
702cfb4908

+ 34 - 0
src/api/innerData/order.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+// 内部订单列表
+export function orderList(params) {
+  return request({
+    url: `/sip/order/list`,
+    method: 'get',
+    params: params
+  })
+}
+// 内部订单删除(明细删除)
+export function delOrder(data) {
+  return request({
+    url: `/sip/order/remove`,
+    method: 'DELETE',
+    data: data
+  })
+}
+// 新增查询订单
+export function searchList(params) {
+  return request({
+    url: `/sip/order/pu/list`,
+    method: 'get',
+    params: params
+  })
+}
+// 内部订单价格修改
+export function editOrder(data) {
+  return request({
+    url: `/sip/order`,
+    method: 'put',
+    data: data
+  })
+}

+ 27 - 0
src/api/innerData/supplier.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 查询供应商列表
+export function supplierList(params) {
+  return request({
+    url: `/sip/supplier/list`,
+    method: 'get',
+    params: params
+  })
+}
+
+// 供应商新增
+export function addSupplier(data) {
+  return request({
+    url: `/sip/supplier`,
+    method: 'post',
+    data: data
+  })
+}
+// 供应商材删除(明细删除)
+export function delSupplier(data) {
+  return request({
+    url: `/sip/supplier/remove`,
+    method: 'DELETE',
+    data: data
+  })
+}

+ 184 - 0
src/views/innerData/addOrderInfo.vue

@@ -1,18 +1,96 @@
 <template>
   <div id="addOrderInfo">
     <div>
+      <el-card style="position: relative;">
       <p>新增订单</p>
+
+      <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto" :show-message="false">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="订单查询">
+              <el-input
+                style="width:200px"
+                clearable
+                :disabled="sonDisable"
+                size="mini"
+                v-model.trim="basicForm.orderCode"
+              >
+              </el-input>
+              <el-button style="margin-left: 10px" size="mini" @click="checkOrder">查询</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+        <el-super-ux-table
+            id="data-table"
+            v-model="tableData"
+            index
+            checkbox
+            :size="size"
+            :dict="dict"
+            :page="pageInfo"
+            :height=500
+            :columns="TableColumns"
+            pagination
+            convenitentOperation
+            storage-key="orderTable"
+            @row-dblclick="useSee"
+            @row-select="useSelect"
+            @selection-change="handleSelectionChange"
+            @row-click="rowSelect"
+            @pagination="useQuery(params, pageInfo)"
+            ref="tables"
+          >
+          <ux-table-column
+            fixed="right"
+            title="内部价格"
+            align="center"
+            width="160"
+            >
+            <template slot-scope="scope">
+              <!-- <el-button type="text" size="mini" v-if="scope.row.status == '1' && scope.row.flowId" @click="reback(scope.row)">收回</el-button> -->
+              <!-- <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button> -->
+              <!-- <el-button type="text" size="mini" @click="delItem(scope.row)">删除</el-button> -->
+              <el-input-number size="mini" controls-position="right" :min="0" v-model="scope.row.sipPrice"></el-input-number>
+            </template>
+          </ux-table-column>
+
+          <ux-table-column
+            fixed="right"
+            title="内部供应商"
+            align="center"
+            width="260"
+            >
+            <template slot-scope="scope">
+              <el-input style="width:200px" clearable :disabled="sonDisable" size="mini" v-model="scope.row.sipSupplierName" @clear="clearHang(scope.rowIndex)">
+                <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.rowIndex,'SIP_SUPPLIER_PARAM',true,'选择内部供应商')"></el-button>
+              </el-input>
+            </template>
+          </ux-table-column>
+        </el-super-ux-table>
+
       <div class="btn_group">
         <el-button type="primary" size="mini"  @click="editPage" v-if="sonPageStu == 'check'">编辑</el-button>
         <el-button type="primary" size="mini"  @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
         <el-button size="mini" plain @click="back">返回</el-button>
       </div>
+
+      </el-card>
     </div>
+
+    <Refers ref="refer" @doSubmit="selectionsToInput" :single="true" />
   </div>
 </template>
 
 <script>
+import { searchList, editOrder } from '@/api/innerData/order.js'
 export default {
+  dicts: [],
+  components: {
+    Refers: () => import("@/components/Refers/refers.vue"),
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
+  },
   props: ['pageStu','row', 'disable'],
   model: {
     prop: 'isList',
@@ -23,6 +101,51 @@ export default {
       // 不能直接改变props传来的值
       sonPageStu: this.pageStu,
       sonDisable: this.disable,
+      basicForm: {
+        orderCode: ''
+      },
+      basicRules: {},
+      size: "mini",
+      pageInfo: {
+        pageNum: 1,
+        pageSize: 20,
+        total: 0
+      },
+      tableData: [],
+      selectData: [],
+      // SearchColumns: SearchColumns,
+      TableColumns: [
+        { item: { key: "puOrgName", title: "采购组织" }, attr: {} },
+        { item: { key: "billTypeName", title: "订单类型" }, attr: {} },
+        { item: { key: "supplierName", title: "供应商" }, attr: {} },
+        { item: { key: "orderCode", title: "订单编号" }, attr: {} },
+        { item: { key: "taxPrice", title: "价税合计" }, attr: {} },
+        { item: { key: "buyerName", title: "采购员" }, attr: {} },
+        { item: { key: "materialName", title: "物料名称" }, attr: {} },
+        { item: { key: "materialCode", title: "物料编码" }, attr: {} },
+        { item: { key: "specification", title: "规格" }, attr: {} },
+        { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家/代理人" }, attr: {} },
+        { item: { key: "unitName", title: "单位" }, attr: {} },
+        { item: { key: "qty", title: "数量" }, attr: {} },
+        { item: { key: "money", title: "含税单价" }, attr: {} },
+      ].map(({ item, attr }) => ({
+      attr,
+      item: {
+        ...item,
+        sortabled: true,
+        fixedabled: true,
+        filterabled: true,
+        hiddenabled: true,
+      },
+      })),
+      ids: [],
+      referCondition: {
+        type: "",
+        isPage: true,
+        title: "",
+      },
+      tableIndex: null,
     }
   },
   methods: {
@@ -31,11 +154,72 @@ export default {
       this.sonDisable = false
     },
     async save() {
+      if (this.tableData.length !== 0 ) {
+        editOrder(this.tableData).then(res => {
+          if( res.code === 200 ) {
+            this.$modal.notifySuccess("新增保存成功");
+            this.back()
+          }
+        })
+      } else {
+        this.$modal.notifyWarning("新增数据不能为空");
+      }
+      // console.log(this.tableData)
     },
     back() {
       this.$emit('jugislist', true)
       this.$emit('refresh')
     },
+    checkOrder() {
+      if (this.basicForm.orderCode) {
+      let params = {orderCode: this.basicForm.orderCode}
+        searchList(params).then(res => {
+          if( res.code === 200 ) {
+            this.tableData = res.rows
+            this.pageInfo.total = res.total
+          }
+        })
+      } else {
+        this.$modal.notifyWarning("请输入订单编号查询");
+      }
+    },
+    useSee() {},
+    useSelect() {},
+    handleSelectionChange(selection) {
+      console.log('选中', selection)
+      this.ids = selection.map(item => item.id)
+      console.log('选中数组', this.ids)
+    },
+    rowSelect(row) {
+      this.$refs.tables.toggleRowSelection([{row: row}]);
+    },
+    // 加载列表
+    async useQuery(prop, page) {
+      // let params = {...prop, ...page}
+      // await orderList(params).then(res => {
+      //   if( res.code === 200 ) {
+      //     this.tableData = res.rows
+      //     this.pageInfo.total = res.total
+      //   }
+      // })
+    },
+    clearHang(index) {
+      this.tableData[index].sipSupplierName = ''
+      this.tableData[index].sipSupplier = ''
+    },
+    selectionsToInput(selection) {
+      if ( this.referCondition.type == "SIP_SUPPLIER_PARAM") {
+        this.tableData[this.tableIndex].sipSupplierName = selection[0].name;
+        this.tableData[this.tableIndex].sipSupplier = selection[0].id;
+      }
+    },
+    chooseDept(index, type, isPage, title) {
+      this.tableIndex = index;
+      this.referCondition.type = type;
+      this.referCondition.isPage = isPage;
+      this.referCondition.title = title;
+      this.$refs.refer.init(this.referCondition);
+    },
   }
 }
 </script>

+ 36 - 2
src/views/innerData/addSupplier.vue

@@ -8,11 +8,12 @@
           <el-col :span="1.5">
             <el-form-item label="供应商" prop="supplierName">
               <el-input
+                style="width:200px"
                 clearable
                 :disabled="sonDisable"
                 size="mini"
                 v-model="basicForm.supplierName"
-                @clear="clearHang('供应商')"
+                @clear="clearHang()"
               >
                 <el-button
                   size="mini"
@@ -31,6 +32,22 @@
             </el-form-item>
           </el-col>
         </el-row>
+
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="备注" prop="remark">
+              <el-input
+                style="width:200px"
+                clearable
+                :disabled="sonDisable"
+                size="mini"
+                v-model="basicForm.remark"
+              >
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+  
       </el-form>
 
       <div class="btn_group">
@@ -48,6 +65,7 @@
 </template>
 
 <script>
+import { addSupplier } from '@/api/innerData/supplier.js'
 export default {
   components: {
     Refers: () => import("@/components/Refers/refers.vue"),
@@ -66,6 +84,7 @@ export default {
         supplierName: '',
         supplierId: '',
         supplierCode: '',
+        remark:''
       },
       basicRules: {},
       referCondition: {
@@ -81,6 +100,16 @@ export default {
       this.sonDisable = false
     },
     async save() {
+      if(this.basicForm.supplierName == '') {
+        this.$modal.notifyWarning("供应商不能为空");
+      } else {
+        await addSupplier(this.basicForm).then(res => {
+          if(res.code === 200) {
+            this.$modal.notifySuccess("新增保存成功");
+            this.back()
+          }
+        })
+      }
     },
     back() {
       this.$emit('jugislist', true)
@@ -97,9 +126,14 @@ export default {
       if ( this.referCondition.type == "SUPPLIER_PARAM") {
         this.basicForm.supplierId = selection[0].id;
         this.basicForm.supplierName = selection[0].name;
+        this.basicForm.supplierCode = selection[0].code;
       }
     },
-    clearHang() {}
+    clearHang() {
+        this.basicForm.supplierId = ''
+        this.basicForm.supplierName = ''
+        this.basicForm.supplierCode = ''
+    }
   }
 }
 </script>

+ 128 - 7
src/views/innerData/orderInfoIndex.vue

@@ -1,11 +1,47 @@
 <template>
   <div id="orderInfoIndex">
     <div v-if="isList">
-      <p>采购订单信息列表</p>
-      <div class="btn_grooup">
-        <el-button type="primary" size="mini" @click="addDivision">新增</el-button>
-        <el-button type="primary" size="mini" @click="delItems">删除</el-button>
-      </div>
+      <el-card v-loading="loading" style="position: relative;">
+        <p>采购订单信息列表</p>
+        <div class="btn_grooup">
+          <el-button type="primary" size="mini" @click="addDivision">新增</el-button>
+          <el-button type="primary" size="mini" @click="delItems">删除</el-button>
+        </div>
+
+        <el-super-ux-table
+            id="data-table"
+            v-model="tableData"
+            index
+            checkbox
+            :size="size"
+            :dict="dict"
+            :page="pageInfo"
+            :height=500
+            :columns="TableColumns"
+            pagination
+            convenitentOperation
+            storage-key="orderTable"
+            @row-dblclick="useSee"
+            @row-select="useSelect"
+            @selection-change="handleSelectionChange"
+            @row-click="rowSelect"
+            @pagination="useQuery(params, pageInfo)"
+            ref="tables"
+          >
+            <ux-table-column
+              fixed="right"
+              title="操作"
+              align="center"
+              width="100"
+              >
+              <template slot-scope="scope">
+                <!-- <el-button type="text" size="mini" v-if="scope.row.status == '1' && scope.row.flowId" @click="reback(scope.row)">收回</el-button> -->
+                <!-- <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button> -->
+                <el-button type="text" size="mini" @click="delItem(scope.row)">删除</el-button>
+              </template>
+            </ux-table-column>
+        </el-super-ux-table>
+      </el-card>
     </div>
 
     <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="searchList"/>
@@ -13,9 +49,12 @@
 </template>
 
 <script>
+import { orderList, delOrder } from '@/api/innerData/order.js'
 export default {
+  dicts: [],
   components: {
     Add: () => import("./addOrderInfo.vue"),
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
   },
   data () {
     return {
@@ -25,8 +64,50 @@ export default {
       page: '',
       disable: false,
       rowDetail: {},
+      size: "mini",
+      loading: false,
+      params: {},
+      pageInfo: {
+        pageNum: 1,
+        pageSize: 20,
+        total: 0
+      },
+      tableData: [],
+      selectData: [],
+      // SearchColumns: SearchColumns,
+      TableColumns: [
+        { item: { key: "puOrgName", title: "采购组织" }, attr: {} },
+        { item: { key: "billTypeName", title: "订单类型" }, attr: {} },
+        { item: { key: "supplierName", title: "供应商" }, attr: {} },
+        { item: { key: "orderCode", title: "订单编号" }, attr: {} },
+        { item: { key: "taxPrice", title: "价税合计" }, attr: {} },
+        { item: { key: "buyerName", title: "采购员" }, attr: {} },
+        { item: { key: "materialName", title: "物料名称" }, attr: {} },
+        { item: { key: "materialCode", title: "物料编码" }, attr: {} },
+        { item: { key: "specification", title: "规格" }, attr: {} },
+        { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家/代理人" }, attr: {} },
+        { item: { key: "unitName", title: "单位" }, attr: {} },
+        { item: { key: "qty", title: "数量" }, attr: {} },
+        { item: { key: "money", title: "含税单价" }, attr: {} },
+        { item: { key: "sipPrice", title: "内部价格" }, attr: {} },
+        { item: { key: "sipSupplierName", title: "内部供应商" }, attr: {} },
+      ].map(({ item, attr }) => ({
+      attr,
+      item: {
+        ...item,
+        sortabled: true,
+        fixedabled: true,
+        filterabled: true,
+        hiddenabled: true,
+      },
+      })),
+      ids: []
     }
   },
+  created() {
+    this.useQuery(this.params, this.pageInfo)
+  },
   methods: {
     // 新增
     addDivision() {
@@ -34,9 +115,49 @@ export default {
       this.page = 'add'
       this.disable = false
     },
-    delItems() {},
+    delItems() {
+      if (this.ids.length <= 0) {
+        this.$modal.notifyWarning("至少勾选一条数据");
+      } else {
+        delOrder(this.ids).then(res => {
+          if(res.code === 200) {
+            this.$modal.notifySuccess("删除成功");
+            this.useQuery(this.params, this.pageInfo)
+          }
+       })
+      }
+    },
     searchList() {
-      // this.useQuery(this.params, this.pageInfo)
+      this.useQuery(this.params, this.pageInfo)
+    },
+    useSee() {},
+    useSelect() {},
+    handleSelectionChange(selection) {
+      console.log('选中', selection)
+      this.ids = selection.map(item => item.id)
+      console.log('选中数组', this.ids)
+    },
+    rowSelect(row) {
+      this.$refs.tables.toggleRowSelection([{row: row}]);
+    },
+    // 加载列表
+    async useQuery(prop, page) {
+      let params = {...prop, ...page}
+      await orderList(params).then(res => {
+        if( res.code === 200 ) {
+          this.tableData = res.rows
+          this.pageInfo.total = res.total
+        }
+      })
+    },
+    delItem(row) {
+      const param = [row.id]
+      delOrder(param).then(res => {
+        if(res.code === 200) {
+          this.$modal.notifySuccess("删除成功");
+          this.useQuery(this.params, this.pageInfo)
+        }
+      })
     },
   }
 }

+ 38 - 11
src/views/innerData/supplierIndex.vue

@@ -36,7 +36,7 @@
             >
             <template slot-scope="scope">
               <!-- <el-button type="text" size="mini" v-if="scope.row.status == '1' && scope.row.flowId" @click="reback(scope.row)">收回</el-button> -->
-              <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
+              <!-- <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button> -->
               <el-button type="text" size="mini" @click="delItem(scope.row)">删除</el-button>
             </template>
           </ux-table-column>
@@ -50,6 +50,7 @@
 </template>
 
 <script>
+import { supplierList, delSupplier } from '@/api/innerData/supplier.js'
 export default {
   dicts: [],
   components: {
@@ -66,6 +67,9 @@ export default {
       rowDetail: {},
       size: "mini",
       loading: false,
+      params: {
+
+      },
       pageInfo: {
         pageNum: 1,
         pageSize: 20,
@@ -75,8 +79,8 @@ export default {
       selectData: [],
       // SearchColumns: SearchColumns,
       TableColumns: [
-        { item: { key: "supplierName", title: "供应商" }, attr: {} },
-        { item: { key: "registrationName", title: "xxx" }, attr: {} },
+        { item: { key: "supplierName", title: "供应商名称" }, attr: {} },
+        { item: { key: "supplierCode", title: "供应商编码" }, attr: {} },
         { item: { key: "remark", title: "备注"}, attr: {} },
       ].map(({ item, attr }) => ({
       attr,
@@ -91,6 +95,9 @@ export default {
       ids: []
     }
   },
+  created() {
+    this.useQuery(this.params, this.pageInfo)
+  },
   methods: {
     // 新增
     addDivision() {
@@ -98,9 +105,20 @@ export default {
       this.page = 'add'
       this.disable = false
     },
-    delItems() {},
+    delItems() {
+      if (this.ids.length <= 0) {
+        this.$modal.notifyWarning("至少勾选一条数据");
+      } else {
+        delSupplier(this.ids).then(res => {
+          if(res.code === 200) {
+            this.$modal.notifySuccess("删除成功");
+            this.useQuery(this.params, this.pageInfo)
+          }
+       })
+      }
+    },
     searchList() {
-      // this.useQuery(this.params, this.pageInfo)
+      this.useQuery(this.params, this.pageInfo)
     },
     useSee() {},
     useSelect() {},
@@ -115,12 +133,21 @@ export default {
     // 加载列表
     async useQuery(prop, page) {
       let params = {...prop, ...page}
-      // await getEquipmentDataList(params).then(res => {
-      //   if( res.code === 200 ) {
-      //     this.tableData = res.rows
-      //     this.pageInfo.total = res.total
-      //   }
-      // })
+      await supplierList(params).then(res => {
+        if( res.code === 200 ) {
+          this.tableData = res.rows
+          this.pageInfo.total = res.total
+        }
+      })
+    },
+    delItem(row) {
+      const param = [row.id]
+      delSupplier(param).then(res => {
+        if(res.code === 200) {
+          this.$modal.notifySuccess("删除成功");
+          this.useQuery(this.params, this.pageInfo)
+        }
+      })
     },
   }
 }

+ 765 - 271
src/views/purchase/DemandSummary/add.vue

@@ -1,86 +1,283 @@
 <template>
   <div id="checkDemandSummary">
-    <el-card style="position: relative;">
+    <el-card style="position: relative">
       <span>采购需求处理详情</span>
       <div class="btn_grooup">
         <el-button type="primary" size="mini" @click="editLine">编辑</el-button>
-        <el-button type="danger" size="mini" v-if="!lineDisable" @click="cancelEdit">取消编辑</el-button>
-        <el-button type="success" size="mini" v-if="!lineDisable" @click="saveLine">保存</el-button>
-        <el-button type="primary" size="mini" v-if="lineDisable" @click="closeLine">行关闭</el-button>
-        <el-button type="primary" size="mini" v-if="lineDisable" @click="reloadBatch">重取批量</el-button>
+        <el-button
+          type="danger"
+          size="mini"
+          v-if="!lineDisable"
+          @click="cancelEdit"
+          >取消编辑</el-button
+        >
+        <el-button
+          type="success"
+          size="mini"
+          v-if="!lineDisable"
+          @click="saveLine"
+          >保存</el-button
+        >
+        <el-button
+          type="primary"
+          size="mini"
+          v-if="lineDisable"
+          @click="closeLine"
+          >行关闭</el-button
+        >
+        <el-button
+          type="primary"
+          size="mini"
+          v-if="lineDisable"
+          @click="reloadBatch"
+          >重取批量</el-button
+        >
       </div>
 
       <el-table
-          v-loading="loading"
-          :data="tableList" 
-          fit
-          :cell-style="{ borderColor: '#c0c0c0' }"
-          :header-cell-style="{ borderColor: '#c0c0c0' }"
-          class="exporttable"
-          border
-          highlight-current-row
-          max-height="580"
-          style="font-size: 12px;"
-          @selection-change="handleSelectionChange"
-          @row-click="rowSelect"
-          ref="table"
+        v-loading="loading"
+        :data="tableList"
+        fit
+        :cell-style="{ borderColor: '#c0c0c0' }"
+        :header-cell-style="{ borderColor: '#c0c0c0' }"
+        class="exporttable"
+        border
+        highlight-current-row
+        max-height="580"
+        style="font-size: 12px"
+        @selection-change="handleSelectionChange"
+        @row-click="rowSelect"
+        ref="table"
+      >
+        <el-table-column show-overflow-tooltip type="selection" fixed="left" />
+        <el-table-column
+          show-overflow-tooltip
+          label="默认采购组织"
+          align="center"
+          prop="orgName"
+          width="250px"
         >
-        <el-table-column show-overflow-tooltip type="selection" fixed="left"/>
-        <el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="orgName" width="250px">
           <template slot-scope="scope">
-              <el-input clearable :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.orgName" @clear="clean(scope.row, '默认采购组织')" @focus="chooseMxHW(scope.$index, 'ORG_PARAM', true, '默认采购组织')">
-                <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ORG_PARAM', true, '默认采购组织')"></el-button>
-              </el-input>
+            <el-input
+              clearable
+              :disabled="scope.row.status !== '1' || lineDisable"
+              size="mini"
+              v-model="scope.row.orgName"
+              @clear="clean(scope.row, '默认采购组织')"
+              @focus="
+                chooseMxHW(scope.$index, 'ORG_PARAM', true, '默认采购组织')
+              "
+            >
+              <el-button
+                size="mini"
+                :disabled="scope.row.status !== '1' || lineDisable"
+                slot="append"
+                icon="el-icon-more"
+                @click="
+                  chooseMxHW(scope.$index, 'ORG_PARAM', true, '默认采购组织')
+                "
+              ></el-button>
+            </el-input>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="需求单号" align="center" prop="code" width="100"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="需求单号"
+          align="center"
+          prop="code"
+          width="100"
+        />
         <!-- <el-table-column show-overflow-tooltip label="序号" align="center" type="index" width="55" fixed="left"/> -->
-        <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
+        <el-table-column
+          show-overflow-tooltip
+          label="行号"
+          align="center"
+          prop="rowNo"
+        >
           <template slot-scope="scope">
-            {{ scope.$index + 1 + '0' }}
+            {{ scope.$index + 1 + "0" }}
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="120"/>
-        <el-table-column show-overflow-tooltip label="品名" align="center" prop="materialName" width="120"/>
-        <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
-        <el-table-column show-overflow-tooltip label="单位" align="center" prop="unit"/>
-        <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturerName" width="120"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="物料编码"
+          align="center"
+          prop="materialCode"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="品名"
+          align="center"
+          prop="materialName"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="规格"
+          align="center"
+          prop="specification"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="单位"
+          align="center"
+          prop="unit"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="生产厂家/代理人"
+          align="center"
+          prop="manufacturerName"
+          width="120"
+        />
         <!-- <el-table-column show-overflow-tooltip label="末级供应仓库存量" align="center" prop="lastWarehouseQty" width="150"/> -->
-        <el-table-column show-overflow-tooltip label="月销量" align="center" prop="totalMonthlySales"/>
-        <el-table-column show-overflow-tooltip label="采购周期" align="center" prop="puPeriod"/>
-        <el-table-column show-overflow-tooltip label="最终净需求量" align="center" prop="resDemandQty" width="100">
+        <el-table-column
+          show-overflow-tooltip
+          label="月销量"
+          align="center"
+          prop="totalMonthlySales"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="采购周期"
+          align="center"
+          prop="puPeriod"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="最终净需求量"
+          align="center"
+          prop="resDemandQty"
+          width="100"
+        >
           <template slot-scope="scope">
-            {{scope.row.resDemandQty ? parseFloat(scope.row.resDemandQty).toFixed(0) : '0'}}
+            {{
+              scope.row.resDemandQty
+                ? parseFloat(scope.row.resDemandQty).toFixed(0)
+                : "0"
+            }}
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="最终采购量" align="center" prop="puQtyRes" width="120">
+        <el-table-column
+          show-overflow-tooltip
+          label="最终采购量"
+          align="center"
+          prop="puQtyRes"
+          width="120"
+        >
           <template slot-scope="scope">
-            <el-input clearable type="number" min="0" size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.puQtyRes"/>
+            <el-input
+              clearable
+              type="number"
+              min="0"
+              size="mini"
+              :disabled="scope.row.status !== '1' || lineDisable"
+              v-model="scope.row.puQtyRes"
+            />
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="关闭数量" align="center" prop="closeQty" width="100"/>
-        <el-table-column show-overflow-tooltip label="需求客户" align="center" prop="customerName" width="100"/>
-        <el-table-column show-overflow-tooltip label="最小订货量" align="center" prop="minOrderQty" width="100">
+        <el-table-column
+          show-overflow-tooltip
+          label="关闭数量"
+          align="center"
+          prop="closeQty"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="需求客户"
+          align="center"
+          prop="customerName"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="最小订货量"
+          align="center"
+          prop="minOrderQty"
+          width="100"
+        >
           <template slot-scope="scope">
-            {{scope.row.minOrderQty ? parseFloat(scope.row.minOrderQty).toFixed(0) : '0'}}
+            {{
+              scope.row.minOrderQty
+                ? parseFloat(scope.row.minOrderQty).toFixed(0)
+                : "0"
+            }}
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="最小包装量" align="center" prop="minPackage" width="100"/>
-        <el-table-column show-overflow-tooltip label="最小批量" align="center" prop="minBatch" width="100">
+        <el-table-column
+          show-overflow-tooltip
+          label="最小包装量"
+          align="center"
+          prop="minPackage"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="最小批量"
+          align="center"
+          prop="minBatch"
+          width="100"
+        >
           <template slot-scope="scope">
-            {{scope.row.minBatch ? parseFloat(scope.row.minBatch).toFixed(0) : '0'}}
+            {{
+              scope.row.minBatch
+                ? parseFloat(scope.row.minBatch).toFixed(0)
+                : "0"
+            }}
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="修改人" align="center" prop="updateByName" width="100"/>
-        <el-table-column show-overflow-tooltip label="修改原因" align="center" prop="updateCause" width="150">
+        <el-table-column
+          show-overflow-tooltip
+          label="修改人"
+          align="center"
+          prop="updateByName"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="修改原因"
+          align="center"
+          prop="updateCause"
+          width="150"
+        >
           <template slot-scope="scope">
-            <el-input clearable size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.updateCause"/>
+            <el-input
+              clearable
+              size="mini"
+              :disabled="scope.row.status !== '1' || lineDisable"
+              v-model="scope.row.updateCause"
+            />
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="业务备注" align="center" prop="remark" width="150"/>
-        <el-table-column show-overflow-tooltip label="有效期" align="center" prop="expiry" width="150"/>
-        <el-table-column show-overflow-tooltip label="要求交货日期" align="center" prop="deliveryDate" width="120"/>
-        <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency">
+        <el-table-column
+          show-overflow-tooltip
+          label="业务备注"
+          align="center"
+          prop="remark"
+          width="150"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="有效期"
+          align="center"
+          prop="expiry"
+          width="150"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="要求交货日期"
+          align="center"
+          prop="deliveryDate"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="紧急标识"
+          align="center"
+          prop="isUrgency"
+        >
           <template slot-scope="scope">
             <el-switch
               v-model="scope.row.isUrgency"
@@ -88,11 +285,17 @@
               active-value="Y"
               inactive-value="N"
               active-color="#13ce66"
-              inactive-color="#a1a3a9">
+              inactive-color="#a1a3a9"
+            >
             </el-switch>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="补单标识" align="center" prop="isReplenishment">
+        <el-table-column
+          show-overflow-tooltip
+          label="补单标识"
+          align="center"
+          prop="isReplenishment"
+        >
           <template slot-scope="scope">
             <el-switch
               v-model="scope.row.isReplenishment"
@@ -101,55 +304,274 @@
               inactive-value="N"
               @change="clean(scope.row, '选择补单供应商')"
               active-color="#13ce66"
-              inactive-color="#a1a3a9">
+              inactive-color="#a1a3a9"
+            >
             </el-switch>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="补单供应商" align="center"  prop="additionalSupplierName" width="200px">
+        <el-table-column
+          show-overflow-tooltip
+          label="补单供应商"
+          align="center"
+          prop="additionalSupplierName"
+          width="200px"
+        >
           <template slot-scope="scope">
-              <el-input clearable :disabled="scope.row.isReplenishment == 'N' || lineDisable" size="mini" v-model="scope.row.additionalSupplierName" @clear="clean(scope.row, '选择补单供应商')" @focus="chooseMxHW(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
-                <el-button size="mini" :disabled="scope.row.isReplenishment == 'N' || lineDisable" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
-              </el-input>
+            <el-input
+              clearable
+              :disabled="scope.row.isReplenishment == 'N' || lineDisable"
+              size="mini"
+              v-model="scope.row.additionalSupplierName"
+              @clear="clean(scope.row, '选择补单供应商')"
+              @focus="
+                chooseMxHW(
+                  scope.$index,
+                  'SUPPLIER_PARAM',
+                  true,
+                  '选择补单供应商'
+                )
+              "
+            >
+              <el-button
+                size="mini"
+                :disabled="scope.row.isReplenishment == 'N' || lineDisable"
+                slot="append"
+                icon="el-icon-more"
+                @click="
+                  chooseMxHW(
+                    scope.$index,
+                    'SUPPLIER_PARAM',
+                    true,
+                    '选择补单供应商'
+                  )
+                "
+              ></el-button>
+            </el-input>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="供应仓库" align="center" prop="lastWarehouseName" width="100"/>
-        <el-table-column show-overflow-tooltip label="供应货位" align="center" prop="lastAllocationName" width="120"/>
-        <el-table-column show-overflow-tooltip label="业务类型" align="center" prop="billType" width="120" :formatter="formatterBillType"/>
-        <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="100px" :formatter="hangStatus"/>
-        <el-table-column show-overflow-tooltip label="收货仓库" align="center" prop="deliveryWarehouseName" width="200">
-            <template slot-scope="scope">
-              <el-input clearable :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clean(scope.row, '收货仓库')" @focus="chooseMxCK(scope.$index, 'WAREHOUSE_PARAM', true, '收货仓库', scope.row.org)">
-                <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseMxCK(scope.$index, 'WAREHOUSE_PARAM', true, '收货仓库', scope.row.org)"></el-button>
-              </el-input>
-            </template>
+        <el-table-column
+          show-overflow-tooltip
+          label="供应仓库"
+          align="center"
+          prop="lastWarehouseName"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="供应货位"
+          align="center"
+          prop="lastAllocationName"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="业务类型"
+          align="center"
+          prop="billType"
+          width="120"
+          :formatter="formatterBillType"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="行状态"
+          align="center"
+          prop="status"
+          width="100px"
+          :formatter="hangStatus"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="收货仓库"
+          align="center"
+          prop="deliveryWarehouseName"
+          width="200"
+        >
+          <template slot-scope="scope">
+            <el-input
+              clearable
+              :disabled="scope.row.status !== '1' || lineDisable"
+              size="mini"
+              v-model="scope.row.deliveryWarehouseName"
+              @clear="clean(scope.row, '收货仓库')"
+              @focus="
+                chooseMxCK(
+                  scope.$index,
+                  'WAREHOUSE_PARAM',
+                  true,
+                  '收货仓库',
+                  scope.row.org
+                )
+              "
+            >
+              <el-button
+                size="mini"
+                :disabled="scope.row.status !== '1' || lineDisable"
+                slot="append"
+                icon="el-icon-more"
+                @click="
+                  chooseMxCK(
+                    scope.$index,
+                    'WAREHOUSE_PARAM',
+                    true,
+                    '收货仓库',
+                    scope.row.org
+                  )
+                "
+              ></el-button>
+            </el-input>
+          </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="收货货位" align="center" prop="deliveryAllocationName" width="200">
+        <el-table-column
+          show-overflow-tooltip
+          label="收货货位"
+          align="center"
+          prop="deliveryAllocationName"
+          width="200"
+        >
           <template slot-scope="scope">
-            <el-input clearable :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clean(scope.row, '收货货位')" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '收货货位', scope.row.deliveryWarehouse)">
-              <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '收货货位', scope.row.deliveryWarehouse)"></el-button>
+            <el-input
+              clearable
+              :disabled="scope.row.status !== '1' || lineDisable"
+              size="mini"
+              v-model="scope.row.deliveryAllocationName"
+              @clear="clean(scope.row, '收货货位')"
+              @focus="
+                chooseMxHW(
+                  scope.$index,
+                  'ALLOCATION_PARAM',
+                  true,
+                  '收货货位',
+                  scope.row.deliveryWarehouse
+                )
+              "
+            >
+              <el-button
+                size="mini"
+                :disabled="scope.row.status !== '1' || lineDisable"
+                slot="append"
+                icon="el-icon-more"
+                @click="
+                  chooseMxHW(
+                    scope.$index,
+                    'ALLOCATION_PARAM',
+                    true,
+                    '收货货位',
+                    scope.row.deliveryWarehouse
+                  )
+                "
+              ></el-button>
             </el-input>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="100"/>
-        <el-table-column show-overflow-tooltip label="制单人" align="center" prop="billMaker" width="100"/>
-        <el-table-column show-overflow-tooltip label="审核人员" align="center" prop="approver" width="100"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="采购员"
+          align="center"
+          prop="buyerName"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="制单人"
+          align="center"
+          prop="billMaker"
+          width="100"
+        />
+        <!-- <el-table-column show-overflow-tooltip label="审核人员" align="center" prop="approver" width="100"/> -->
         <!-- <el-table-column show-overflow-tooltip label="请购单号" align="center" prop="code"/> -->
-        <el-table-column show-overflow-tooltip label="品类" align="center" prop="materialCategory" width="100"/>
-        <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant" width="100"/>
-        <el-table-column show-overflow-tooltip label="集团预测分类" align="center" prop="forecastClassify" width="120"/>
-        <el-table-column show-overflow-tooltip label="修改时间" align="center" prop="updateTime" width="140"/>
-        <el-table-column show-overflow-tooltip label="采购员编码" align="center" prop="buyer" width="100"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="品类"
+          align="center"
+          prop="materialCategory"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="注册人"
+          align="center"
+          prop="registrant"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="集团预测分类"
+          align="center"
+          prop="forecastClassify"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="修改时间"
+          align="center"
+          prop="updateTime"
+          width="140"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="采购员编码"
+          align="center"
+          prop="buyer"
+          width="100"
+        />
         <!-- <el-table-column show-overflow-tooltip label="采购组织" align="center" prop="orgName" width="150"/> -->
-        <el-table-column show-overflow-tooltip label="有效期单位" align="center" prop="expiryUnit" width="100"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="有效期单位"
+          align="center"
+          prop="expiryUnit"
+          width="100"
+        />
         <!-- <el-table-column show-overflow-tooltip label="业务部门" align="center" prop="businessDeptName"/> -->
-        <el-table-column show-overflow-tooltip label="需求部门" align="center" prop="demandDeptName" width="150">
+        <el-table-column
+          show-overflow-tooltip
+          label="需求部门"
+          align="center"
+          prop="demandDeptName"
+          width="150"
+        >
           <template slot-scope="scope">
-              <el-input clearable :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.demandDeptName" @clear="clean(scope.row, '需求部门')" @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '需求部门', scope.row.org)">
-                <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '需求部门', scope.row.org)"></el-button>
-              </el-input>
+            <el-input
+              clearable
+              :disabled="scope.row.status !== '1' || lineDisable"
+              size="mini"
+              v-model="scope.row.demandDeptName"
+              @clear="clean(scope.row, '需求部门')"
+              @focus="
+                chooseMxBM(
+                  scope.$index,
+                  'DEPT_PARAM',
+                  true,
+                  '需求部门',
+                  scope.row.org
+                )
+              "
+            >
+              <el-button
+                size="mini"
+                :disabled="scope.row.status !== '1' || lineDisable"
+                slot="append"
+                icon="el-icon-more"
+                @click="
+                  chooseMxBM(
+                    scope.$index,
+                    'DEPT_PARAM',
+                    true,
+                    '需求部门',
+                    scope.row.org
+                  )
+                "
+              ></el-button>
+            </el-input>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="120">
+        <el-table-column
+          show-overflow-tooltip
+          label="批号锁定标识"
+          align="center"
+          prop="isBatchLock"
+          width="120"
+        >
           <template slot-scope="scope">
             <el-switch
               v-model="scope.row.isBatchLock"
@@ -157,97 +579,154 @@
               active-value="Y"
               inactive-value="N"
               active-color="#13ce66"
-              inactive-color="#a1a3a9">
+              inactive-color="#a1a3a9"
+            >
             </el-switch>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="采购需求单审批人" align="center" prop="approveName" width="140"/>
-        <el-table-column show-overflow-tooltip label="需求单审批时间" align="center" prop="approverFinishTime" width="120"/>
-        <el-table-column show-overflow-tooltip label="需求单提交时间" align="center" prop="createTime" width="120"/>
-        <el-table-column show-overflow-tooltip label="需求单提交人" align="center" prop="createByName" width="120"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="采购需求单审批人"
+          align="center"
+          prop="approveName"
+          width="140"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="需求单审批时间"
+          align="center"
+          prop="approverFinishTime"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="需求单提交时间"
+          align="center"
+          prop="createTime"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="需求单提交人"
+          align="center"
+          prop="createByName"
+          width="120"
+        />
         <!-- <el-table-column show-overflow-tooltip label="处理需求时间" align="center" prop="processTime"/> -->
         <!-- <el-table-column show-overflow-tooltip label="处理需求人员" align="center" prop="processPersonal"/> -->
-        <el-table-column show-overflow-tooltip label="处理确认人" align="center" prop="affirmerName" width="100"/>
-        <el-table-column show-overflow-tooltip label="处理确认时间" align="center" prop="affirmerTime" width="120"/>
-        <el-table-column show-overflow-tooltip label="处理审批时间" align="center" prop="puManagerApproverDate" width="120"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="处理确认人"
+          align="center"
+          prop="affirmerName"
+          width="100"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="处理确认时间"
+          align="center"
+          prop="affirmerTime"
+          width="120"
+        />
+        <el-table-column
+          show-overflow-tooltip
+          label="处理审批时间"
+          align="center"
+          prop="puManagerApproverDate"
+          width="120"
+        />
         <!-- <el-table-column show-overflow-tooltip label="转请购时间" align="center" prop="code"/>
         <el-table-column show-overflow-tooltip label="转请购人员" align="center" prop="code"/> -->
-        <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="100" :formatter="priceClass"/>
+        <el-table-column
+          show-overflow-tooltip
+          label="价格类型"
+          align="center"
+          prop="priceType"
+          width="100"
+          :formatter="priceClass"
+        />
       </el-table>
 
       <div class="btn_group">
         <el-col :span="1.5">
-          <el-button size="mini" plain @click="back" v-if="lineDisable">返回</el-button>
+          <el-button size="mini" plain @click="back" v-if="lineDisable"
+            >返回</el-button
+          >
         </el-col>
       </div>
     </el-card>
 
-    <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
+    <Refers ref="refer" @doSubmit="selectionsToInput" :single="true" />
   </div>
 </template>
 
 <script>
-import Refers from '@/components/Refers/refers.vue'
-import {getSummaryDetail, shutDownSummary, editSummaryMx, reloadBatch } from '@/api/purchase/DemandSummary.js'
+import Refers from "@/components/Refers/refers.vue";
+import {
+  getSummaryDetail,
+  shutDownSummary,
+  editSummaryMx,
+  reloadBatch,
+} from "@/api/purchase/DemandSummary.js";
 export default {
-  name: 'checkDemandSummary',
+  name: "checkDemandSummary",
   components: {
-    Refers
+    Refers,
   },
-  props: ['pageStu','row', 'disable', 'query'],
+  props: ["pageStu", "row", "disable", "query"],
   model: {
-    prop: 'isList',
-    event: 'jugislist'
+    prop: "isList",
+    event: "jugislist",
   },
   data() {
-    return{
+    return {
       loading: true,
       hangStatus(row) {
         switch (row.status) {
-          case '0':
-            return '需补货'
-          case '1':
-            return '待计划确认'
-          case '2':
-            return '计划已确认'
-          case '3':
-            return '计划已审核'
-          case '4':
-            return '行关闭'
-          case '5':
-            return '总供应可满足'
+          case "0":
+            return "需补货";
+          case "1":
+            return "待计划确认";
+          case "2":
+            return "计划已确认";
+          case "3":
+            return "计划已审核";
+          case "4":
+            return "行关闭";
+          case "5":
+            return "总供应可满足";
         }
       },
       priceClass(row) {
         switch (row.priceType) {
-          case 'order':
-            return '订货价'
-          case 'consignment':
-            return '寄售价'
-          case 'adjusted':
-            return '调货价'
+          case "order":
+            return "订货价";
+          case "consignment":
+            return "寄售价";
+          case "adjusted":
+            return "调货价";
         }
       },
       formatterBillType(row) {
         switch (row.billType) {
-          case 'ZQBH':
-            return '周期备货'
-          case 'FXXQ':
-            return '分销需求'
-          case 'TSXQ':
-            return '特殊采购需求'
-          case 'BDXQ':
-            return '补单需求'
-          case 'JJXQ':
-            return '紧急需求单'
-          case 'XPXQ':
-            return '新品需求'
-          case 'HZBM':
-            return '合作部门需求'
-          case 'DZBH':
-            return '大宗备货'
-          case 'XZCG':
-            return '行政类采购'
+          case "ZQBH":
+            return "周期备货";
+          case "FXXQ":
+            return "分销需求";
+          case "TSXQ":
+            return "特殊采购需求";
+          case "BDXQ":
+            return "补单需求";
+          case "JJXQ":
+            return "紧急需求单";
+          case "XPXQ":
+            return "新品需求";
+          case "HZBM":
+            return "合作部门需求";
+          case "DZBH":
+            return "大宗备货";
+          case "XZCG":
+            return "行政类采购";
         }
       },
       // 不能直接改变props传来的值
@@ -256,217 +735,232 @@ export default {
       tableList: [],
       ids: [],
       lineDisable: true,
-      tableIndex: '',
+      tableIndex: "",
       referCondition: {
-        type: '',
+        type: "",
         isPage: true,
-        title: ''
-      }
-    }
+        title: "",
+      },
+    };
   },
   created() {
-    if(this.pageStu == 'check') {
-      console.log('数据', this.row)
-      let param = JSON.parse(JSON.stringify(this.query))
-      param.sumFlag = this.row.sumFlag
-      this.getDetails(param)
+    if (this.pageStu == "check") {
+      console.log("数据", this.row);
+      let param = JSON.parse(JSON.stringify(this.query));
+      param.sumFlag = this.row.sumFlag;
+      this.getDetails(param);
     }
   },
   methods: {
     handleSelectionChange(selection) {
-      console.log('选中', selection)
-      this.ids = selection.map(item => item.demandItemId)
-      console.log('选中数组', this.ids.join())
+      console.log("选中", selection);
+      this.ids = selection.map((item) => item.demandItemId);
+      console.log("选中数组", this.ids.join());
     },
     rowSelect(row) {
       this.$refs.table.toggleRowSelection(row);
     },
     back() {
-      this.$emit('jugislist', true)
+      this.$emit("jugislist", true);
       // let queryParams = {
       //   pageNum: 1,
       //   pageSize: 10
       // }
-      this.$emit('refresh')
+      this.$emit("refresh");
     },
     // 如果需要回显则调用详情接口
     getDetails(row) {
-      row.demandItemId = this.row.demandItemId
-      getSummaryDetail(row).then(res => {
-        if (res.code === 200) {
-          this.tableList = res.data
-        }
-      }).then(() => {
-        this.loading = false
-        this.tableList.forEach(item => {
-          if(item.puQtyRes) {
-            item.puQtyRes = parseFloat(item.puQtyRes).toFixed(0)
+      row.demandItemId = this.row.demandItemId;
+      getSummaryDetail(row)
+        .then((res) => {
+          if (res.code === 200) {
+            this.tableList = res.data;
           }
         })
-      }).catch(err => {
-        this.loading = false
-      })
+        .then(() => {
+          this.loading = false;
+          this.tableList.forEach((item) => {
+            if (item.puQtyRes) {
+              item.puQtyRes = parseFloat(item.puQtyRes).toFixed(0);
+            }
+          });
+        })
+        .catch((err) => {
+          this.loading = false;
+        });
     },
     editLine() {
-      console.log('sonList`````', this.tableList)
-      this.lineDisable = false
+      console.log("sonList`````", this.tableList);
+      this.lineDisable = false;
     },
     cancelEdit() {
-      this.lineDisable = true
-      let param = JSON.parse(JSON.stringify(this.query))
-      param.sumFlag = this.row.sumFlag
-      this.getDetails(param)
+      this.lineDisable = true;
+      let param = JSON.parse(JSON.stringify(this.query));
+      param.sumFlag = this.row.sumFlag;
+      this.getDetails(param);
     },
     saveLine() {
-      editSummaryMx(this.tableList).then(res => {
+      editSummaryMx(this.tableList).then((res) => {
         if (res.code === 200) {
           this.$modal.notifySuccess("保存成功");
-          this.lineDisable = true
-          let param = JSON.parse(JSON.stringify(this.query))
-          param.sumFlag = this.row.sumFlag
-          this.getDetails(param)
+          this.lineDisable = true;
+          let param = JSON.parse(JSON.stringify(this.query));
+          param.sumFlag = this.row.sumFlag;
+          this.getDetails(param);
         }
-      })
+      });
     },
     // 行关闭
     closeLine() {
       if (this.ids.length == 0) {
         this.$modal.notifyWarning("请选中至少一条数据");
       } else {
-        this.$modal.confirm('是否确定关闭?').then(function () {
-        }).then(() => {
-          let param = this.ids.join()
-          shutDownSummary(param).then(res => {
-            if (res.code === 200) {
-              this.$modal.notifySuccess("操作成功");
-              let param = JSON.parse(JSON.stringify(this.query))
-              param.sumFlag = this.row.sumFlag
-              this.getDetails(param)
-            }
+        this.$modal
+          .confirm("是否确定关闭?")
+          .then(function () {})
+          .then(() => {
+            let param = this.ids.join();
+            shutDownSummary(param).then((res) => {
+              if (res.code === 200) {
+                this.$modal.notifySuccess("操作成功");
+                let param = JSON.parse(JSON.stringify(this.query));
+                param.sumFlag = this.row.sumFlag;
+                this.getDetails(param);
+              }
+            });
           })
-        }).catch(() => {})
+          .catch(() => {});
       }
     },
     // 重取批量
     reloadBatch() {
-      this.$modal.confirm('是否更新明细的最小包装量,最小订货量,最小批量?').then(function () {}).then(() => {
-        let param = this.tableList.map(item => { return item.demandItemId })
-        reloadBatch(param).then(res => {
-          if (res.code === 200) {
-            this.$modal.notifySuccess("操作成功");
-            let params = JSON.parse(JSON.stringify(this.query))
-            params.sumFlag = this.row.sumFlag
-            params.demandItemId = this.row.demandItemId
-            this.getDetails(params)
-          }
+      this.$modal
+        .confirm("是否更新明细的最小包装量,最小订货量,最小批量?")
+        .then(function () {})
+        .then(() => {
+          let param = this.tableList.map((item) => {
+            return item.demandItemId;
+          });
+          reloadBatch(param).then((res) => {
+            if (res.code === 200) {
+              this.$modal.notifySuccess("操作成功");
+              let params = JSON.parse(JSON.stringify(this.query));
+              params.sumFlag = this.row.sumFlag;
+              params.demandItemId = this.row.demandItemId;
+              this.getDetails(params);
+            }
+          });
         })
-      }).catch(() =>{})
-      
+        .catch(() => {});
     },
     // 明细行选择货位
     chooseMxHW(index, type, isPage, title, stordocId) {
-      this.tableIndex = index
-      this.referCondition.type = type
-      this.referCondition.isPage = isPage
-      this.referCondition.title = title
-      this.referCondition.stordocId = stordocId
-      this.$refs.refer.init(this.referCondition)
+      this.tableIndex = index;
+      this.referCondition.type = type;
+      this.referCondition.isPage = isPage;
+      this.referCondition.title = title;
+      this.referCondition.stordocId = stordocId;
+      this.$refs.refer.init(this.referCondition);
     },
     // 明细行选择仓库
     chooseMxCK(index, type, isPage, title, orgId) {
-      this.tableIndex = index
-      this.referCondition.type = type
-      this.referCondition.isPage = isPage
-      this.referCondition.title = title
-      this.referCondition.pkOrg = orgId
-      this.$refs.refer.init(this.referCondition)
+      this.tableIndex = index;
+      this.referCondition.type = type;
+      this.referCondition.isPage = isPage;
+      this.referCondition.title = title;
+      this.referCondition.pkOrg = orgId;
+      this.$refs.refer.init(this.referCondition);
     },
     // 明细行选择部门
     chooseMxBM(index, type, isPage, title, drpOrg) {
-      this.tableIndex = index
-      this.referCondition.type = type
-      this.referCondition.isPage = isPage
-      this.referCondition.title = title
-      this.referCondition.drpOrg = drpOrg
-      this.$refs.refer.init(this.referCondition)
+      this.tableIndex = index;
+      this.referCondition.type = type;
+      this.referCondition.isPage = isPage;
+      this.referCondition.title = title;
+      this.referCondition.drpOrg = drpOrg;
+      this.$refs.refer.init(this.referCondition);
     },
     selectionsToInput(selection) {
-      if (this.referCondition.title == '收货货位') {
-        this.tableList[this.tableIndex].deliveryAllocationName = selection[0].name
-        this.tableList[this.tableIndex].deliveryAllocation = selection[0].id
+      if (this.referCondition.title == "收货货位") {
+        this.tableList[this.tableIndex].deliveryAllocationName =
+          selection[0].name;
+        this.tableList[this.tableIndex].deliveryAllocation = selection[0].id;
       }
-      if (this.referCondition.title == '收货仓库') {
-        this.tableList[this.tableIndex].deliveryWarehouseName = selection[0].name
-        this.tableList[this.tableIndex].deliveryWarehouse = selection[0].id
-        this.tableList[this.tableIndex].deliveryAllocation = ''
-        this.tableList[this.tableIndex].deliveryAllocationName = ''
+      if (this.referCondition.title == "收货仓库") {
+        this.tableList[this.tableIndex].deliveryWarehouseName =
+          selection[0].name;
+        this.tableList[this.tableIndex].deliveryWarehouse = selection[0].id;
+        this.tableList[this.tableIndex].deliveryAllocation = "";
+        this.tableList[this.tableIndex].deliveryAllocationName = "";
       }
-      if (this.referCondition.title == '需求部门') {
-        this.tableList[this.tableIndex].demandDeptName = selection[0].name
-        this.tableList[this.tableIndex].demandDept = selection[0].id
+      if (this.referCondition.title == "需求部门") {
+        this.tableList[this.tableIndex].demandDeptName = selection[0].name;
+        this.tableList[this.tableIndex].demandDept = selection[0].id;
       }
-      if (this.referCondition.title == '选择补单供应商') {
-        this.tableList[this.tableIndex].additionalSupplierName = selection[0].name
-        this.tableList[this.tableIndex].additionalSupplier = selection[0].id
+      if (this.referCondition.title == "选择补单供应商") {
+        this.tableList[this.tableIndex].additionalSupplierName =
+          selection[0].name;
+        this.tableList[this.tableIndex].additionalSupplier = selection[0].id;
       }
-      if (this.referCondition.title == '默认采购组织') {
-        this.tableList[this.tableIndex].org = selection[0].id
-        this.tableList[this.tableIndex].orgName = selection[0].name
-        this.tableList[this.tableIndex].deliveryWarehouse = ''
-        this.tableList[this.tableIndex].deliveryWarehouseName = ''
-        this.tableList[this.tableIndex].deliveryAllocation = ''
-        this.tableList[this.tableIndex].deliveryAllocationName = ''
+      if (this.referCondition.title == "默认采购组织") {
+        this.tableList[this.tableIndex].org = selection[0].id;
+        this.tableList[this.tableIndex].orgName = selection[0].name;
+        this.tableList[this.tableIndex].deliveryWarehouse = "";
+        this.tableList[this.tableIndex].deliveryWarehouseName = "";
+        this.tableList[this.tableIndex].deliveryAllocation = "";
+        this.tableList[this.tableIndex].deliveryAllocationName = "";
       }
     },
     // 清空选中的货位
     clean(row, title) {
-      if (title == '收货仓库') {
-        row.deliveryWarehouse = ''
-        row.deliveryWarehouseName = ''
-        row.deliveryAllocation = ''
-        row.deliveryAllocationName = ''
+      if (title == "收货仓库") {
+        row.deliveryWarehouse = "";
+        row.deliveryWarehouseName = "";
+        row.deliveryAllocation = "";
+        row.deliveryAllocationName = "";
       }
-      if (title == '收货货位') {
-        row.deliveryAllocation = ''
-        row.deliveryAllocationName = ''
+      if (title == "收货货位") {
+        row.deliveryAllocation = "";
+        row.deliveryAllocationName = "";
       }
-      if (title == '选择补单供应商') {
-        row.additionalSupplier = ''
-        row.additionalSupplierName = ''
+      if (title == "选择补单供应商") {
+        row.additionalSupplier = "";
+        row.additionalSupplierName = "";
       }
-      if (title == '需求部门') {
-        row.demandDeptName = ''
-        row.demandDept = ''
+      if (title == "需求部门") {
+        row.demandDeptName = "";
+        row.demandDept = "";
       }
-      if (title == '默认采购组织') {
-        row.org = ''
-        row.orgName = ''
-        row.deliveryWarehouse = ''
-        row.deliveryWarehouseName = ''
-        row.deliveryAllocation = ''
-        row.deliveryAllocationName = ''
+      if (title == "默认采购组织") {
+        row.org = "";
+        row.orgName = "";
+        row.deliveryWarehouse = "";
+        row.deliveryWarehouseName = "";
+        row.deliveryAllocation = "";
+        row.deliveryAllocationName = "";
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
- .btn_group {
+.btn_group {
   // width: 100%;
   // margin: 20px 0;
   display: flex;
   // justify-content: center;
   position: absolute;
-  top: 10px;right: 20px;
-} 
+  top: 10px;
+  right: 20px;
+}
 .btn_grooup {
   margin-top: 10px;
   margin-bottom: 10px;
   display: flex;
   justify-content: flex-end;
-} 
+}
 ::v-deep .el-table__row > td {
   border-right: none;
 }
-</style>
+</style>

+ 22 - 1
src/views/purchase/PurchaseDemandList/add.vue

@@ -679,8 +679,8 @@
             align="center"
             field="deliveryDate"
             width="230px"
-            edit-render
           >
+            <!-- edit-render -->
             <template v-slot:edit="scope">
               <el-date-picker
                 v-model="scope.row.deliveryDate"
@@ -1611,6 +1611,27 @@ export default {
       },
     };
   },
+  watch: {
+    // "basicForm.demandDate": {
+    //   handler(nVal, oVal) {
+    //     if (nVal && nVal !== "") {
+    //       交货日期=需求日期+采购周期+2    且不允许修改
+    //       let { puDemandItemList } = this.basicForm;
+    //       this.basicForm.puDemandItemList = puDemandItemList.map((item) => {
+    //         let deliveryDate = new Date(
+    //           new Date(nVal).setDate(
+    //             new Date(nVal).getDate() + Number(item.puPeriod) + 2
+    //           )
+    //         ).Format("yyyy-MM-dd");
+    //         return {
+    //           ...item,
+    //           deliveryDate,
+    //         };
+    //       });
+    //     }
+    //   },
+    // },
+  },
   created() {
     if (this.pageStu == "check") {
       this.getDetails(this.row);

+ 1 - 1
src/views/purchase/PurchaseDemandList/index.vue

@@ -348,7 +348,7 @@ export default {
   components: {
     Add: () => import("./add.vue"),
     Refers: () => import("@/components/Refers/refers.vue"),
-    TreeRefers: () => import("@/components/Refers/refers.vue"),
+    TreeRefers: () => import("@/components/Refers/sigleTreeRefer.vue"),
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
     BatchImport: () => import("@/components/BatchImport/index.vue"),
     ElSuperSearch: () => import("@/components/super-search/index.vue"),