소스 검색

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

001295 1 년 전
부모
커밋
cc61a98d2c

+ 18 - 1
src/api/business/purchase/purchase-order.js

@@ -101,6 +101,22 @@ const close = (data) => {
     data,
   });
 }
+// 采购订单行关闭
+const itemClose = (data) => {
+  return request({
+    url: `/pu/order/item/close`,
+    method: "post",
+    data,
+  });
+}
+// 采购订单行打开
+const itemOpen = (data) => {
+  return request({
+    url: `/pu/order/item/open`,
+    method: "post",
+    data,
+  });
+}
 
 // 采购订单发送NC
 const toNc = (data) => {
@@ -222,5 +238,6 @@ export default {
   downloadFailData,
   oaBack,
   modifyBuyer,
-  
+  itemClose,
+  itemOpen,
 }

+ 5 - 2
src/components/popover-select-v2/index.vue

@@ -110,8 +110,11 @@ export default {
   methods: {
     // open dialog
     async open() {
-      this.visible = true;
-      await this.useReset();
+      let { disabled } = this.$attrs;
+      if (!disabled) {
+        this.visible = true;
+        await this.useReset();
+      }
     },
     // hide dialog
     async hide() {

+ 1 - 0
src/views/material/changeApply/add/index.vue

@@ -378,6 +378,7 @@ export default {
           >
             <div style="height: 420px;display:flex">
               <el-super-table
+                index
                 v-model="materialInfo[item.key]"
                 :dict="dict"
                 :ref="tabName"

+ 140 - 152
src/views/material/changeApply/see/index.vue

@@ -1,8 +1,12 @@
 <!-- 批量新增 -->
 <script>
 import useColumns from "../add/column";
-import {addChangeList, getMaterialDetails, getChangeDetails, editChangeList} from '@/api/changeApply/basic';
-
+import {
+  addChangeList,
+  getMaterialDetails,
+  getChangeDetails,
+  editChangeList,
+} from "@/api/changeApply/basic";
 
 export default {
   name: "SeeChangeOrders",
@@ -21,7 +25,6 @@ export default {
   },
 
   data() {
-
     const {
       TabColumns,
       TableColumns,
@@ -35,28 +38,26 @@ export default {
     const rules = this.$init.rules([...TabColumns, ...TableColumns]);
     const params = this.$init.params([...TabColumns, ...TableColumns]);
     let tabColumns = _.cloneDeep(TabColumns);
-    tabColumns =  tabColumns.map(item =>( 
-
-      {...item,
-        TableColumns: [...item.TableColumns.map(column =>({
-          item:{...column.item,disabled:true},
-          attr:{
+    tabColumns = tabColumns.map((item) => ({
+      ...item,
+      TableColumns: [
+        ...item.TableColumns.map((column) => ({
+          item: { ...column.item, disabled: true },
+          attr: {
             ...column.attr,
-            disabled:true
-          }
-        }))]
-      }
-      )
+            disabled: true,
+          },
+        })),
+      ],
+    }));
 
-    )
+    console.log(tabColumns, "tabColumns");
 
-    console.log(tabColumns,'tabColumns');
-    
     return {
       width: "100%",
       visible: false,
-      loading:false,
-      title:'查看',
+      loading: false,
+      title: "查看",
       rules,
       params,
       tabName: tabName,
@@ -65,9 +66,8 @@ export default {
     };
   },
   computed: {
-   
-    materialInfo:{
-      get(){
+    materialInfo: {
+      get() {
         const { materialBasic } = this.params;
         this.params.materialBasic = materialBasic.map((item, index) => ({
           ...item,
@@ -78,21 +78,17 @@ export default {
           materialBasic: this.params.materialBasic.filter(
             ({ delFlag }) => delFlag !== "2"
           ),
-        }
+        };
       },
-      set(){},
-    }
-  
-  },
-  watch: {
-    
+      set() {},
+    },
   },
+  watch: {},
   methods: {
-    setVisible(prop){
+    setVisible(prop) {
       this.visible = prop;
     },
-    beforeOpen(){
-    },
+    beforeOpen() {},
     //
     async fetchItem(prop) {
       try {
@@ -101,10 +97,9 @@ export default {
 
         let { code, data } = await getChangeDetails(prop.id);
 
-        if(code == 200){
+        if (code == 200) {
           this.params = data;
         }
-        
       } catch (err) {
         // catch
         console.error(err);
@@ -113,7 +108,7 @@ export default {
         this.loading = false;
       }
     },
-    
+
     //
     async hide() {
       const {
@@ -127,40 +122,36 @@ export default {
       } = useColumns();
       this.visible = false;
       this.tabName = tabName;
-      this.$emit('success');
+      this.$emit("success");
       this.params = this.$init.params([...TabColumns, ...TableColumns]);
     },
-   
-    async handleSubmit(){
-      this.params = {...this.params,status:'1'};
-      console.log(this.params,'this.params');
+
+    async handleSubmit() {
+      this.params = { ...this.params, status: "1" };
+      console.log(this.params, "this.params");
       try {
-          this.loading = true;
-          
-          const {code,msg} = await addChangeList(this.params);
+        this.loading = true;
 
-          if(code == 200){
+        const { code, msg } = await addChangeList(this.params);
 
-            this.hide();
-            this.$notify.success({
-              message: msg,
-            });
-          }
-          
-        } catch (error) {}
-        finally{
-          this.loading = false;
+        if (code == 200) {
+          this.hide();
+          this.$notify.success({
+            message: msg,
+          });
         }
+      } catch (error) {
+      } finally {
+        this.loading = false;
+      }
     },
-    handleSubmitValidate(prop,cb){
-
+    handleSubmitValidate(prop, cb) {
       this.$refs[prop].$refs[prop].validate(async (valid) => {
         if (valid) {
           try {
             this.loading = true;
 
             await cb();
-            
           } catch (err) {
             // catch
             console.error(err);
@@ -174,113 +165,112 @@ export default {
       });
     },
   },
-  created() {
-  },
+  created() {},
   mounted() {},
   destroyed() {},
 };
 </script>
 
 <template>
-    <el-drawer
-      v-bind="$attrs"
-      v-on="$listeners"
-      :size="width"
-      :visible.sync="visible"
-      destroy-on-close
-      :show-close="false"
-      @close="hide"
-      @open="beforeOpen"
-      v-loading="loading"
+  <el-drawer
+    v-bind="$attrs"
+    v-on="$listeners"
+    :size="width"
+    :visible.sync="visible"
+    destroy-on-close
+    :show-close="false"
+    @close="hide"
+    @open="beforeOpen"
+    v-loading="loading"
+  >
+    <div
+      slot="title"
+      style="display: flex; justify-content: space-between; align-items: center"
     >
-      <div 
-        slot="title" 
-        style="display: flex;
-            justify-content: space-between;
-            align-items: center;"
-      >
-        <h3>{{title}}</h3>
-        <div>
-          <el-button 
-            v-if="params.status === '0' || params.status === '3'"
-            type="primary"
-            :size="$attrs.size" 
-            :loading="loading" 
-            @click="handleSubmit"
-          >
-            提 交
-          </el-button>
-          <el-button :size="$attrs.size" :loading="loading" @click="hide"
-            >取 消</el-button>
-        </div>
+      <h3>{{ title }}</h3>
+      <div>
+        <el-button
+          v-if="params.status === '0' || params.status === '3'"
+          type="primary"
+          :size="$attrs.size"
+          :loading="loading"
+          @click="handleSubmit"
+        >
+          提 交
+        </el-button>
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
       </div>
-      <el-super-form
-        v-model="params"
-        :dict="dict"
-        :rules="rules"
-        :size="$attrs.size"
-        :columns="TableColumns"
-        ref="superForm"
-        label-width="auto"
-        label-position="right"
-        style="padding: 20px"
+    </div>
+    <el-super-form
+      v-model="params"
+      :dict="dict"
+      :rules="rules"
+      :size="$attrs.size"
+      :columns="TableColumns"
+      ref="superForm"
+      label-width="auto"
+      label-position="right"
+      style="padding: 20px"
+    >
+      <template slot="puOrgName" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          @change="changePuOrgName({ ...scope, select: $event })"
+        >
+        </component
+      ></template>
+    </el-super-form>
+
+    <el-tabs v-model="tabName" style="padding: 0 20px 20px">
+      <el-tab-pane
+        v-for="({ item, TableColumns: columns }, index) in TabColumns"
+        :key="index"
+        :label="item.title"
+        :name="item.key"
+        lazy
       >
-        <template slot="puOrgName" slot-scope="scope">
-          <component
-            v-bind="scope.attr"
-            v-model="scope.row[scope.item.key]"
+        <div style="height: 420px; display: flex">
+          <el-super-table
+            v-model="materialInfo[item.key]"
+            :dict="dict"
+            index
+            :ref="tabName"
+            :columns="columns"
             :size="$attrs.size"
-            :source.sync="scope.row"
-            @change="changePuOrgName({ ...scope, select: $event })"
-          >
-          </component
-        ></template>
-      </el-super-form>
-      
-    
-        <el-tabs v-model="tabName" style="padding: 0 20px 20px">
-          <el-tab-pane
-            v-for="({ item, TableColumns: columns }, index) in TabColumns"
-            :key="index"
-            :label="item.title"
-            :name="item.key"
-            lazy
           >
-          <div style="height: 420px;display:flex">
-            <el-super-table
-              v-model="materialInfo[item.key]"
-              :dict="dict"
-              :ref="tabName"
-              :columns="columns"
-              :size="$attrs.size"
+            <template slot="materialName" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                @change="changeMaterialName(scope)"
+              >
+              </component>
+            </template>
+            <el-table-column
+              fixed="right"
+              label="操作"
+              width="120"
+              align="center"
             >
-              <template slot="materialName" slot-scope="scope">
-                <component
-                  v-bind="scope.attr"
-                  v-model="scope.row[scope.item.key]"
-                  :size="$attrs.size"
-                  :source.sync="scope.row"
-                  @change="changeMaterialName(scope)"
-                >
-                </component>
+              <template slot-scope="scope">
+                <AmendantRecord
+                  v-if="tabName === 'materialBasic'"
+                  v-model="scope.row"
+                ></AmendantRecord>
               </template>
-              <el-table-column fixed="right" label="操作" width="120" align="center">
-                
-                <template slot-scope="scope">
-                  <AmendantRecord
-                    v-if=" tabName ==='materialBasic' "
-                    v-model="scope.row"
-                  ></AmendantRecord>
-                  
-                </template>
-              </el-table-column>
-            </el-super-table>
-          </div>
-           
-          </el-tab-pane>
-        </el-tabs>
-     
-    </el-drawer>
+            </el-table-column>
+          </el-super-table>
+        </div>
+      </el-tab-pane>
+    </el-tabs>
+  </el-drawer>
 </template>
 
 <style scoped>
@@ -288,5 +278,3 @@ export default {
   display: none;
 }
 </style>
-
-

+ 2 - 2
src/views/material/classify/index.vue

@@ -3,7 +3,7 @@
 
     <el-card v-loading="loading">
 
-      <el-row :gutter="10" class="mb10">
+      <el-row :gutter="10" class="mb10" style="position: fixed;top: 20px; right: 50px;z-index: 999;">
         <div>
           <el-button type="primary" size="mini" @click="mbDownload">模板下载</el-button>
           <el-button type="primary" size="mini" @click="importMb">导入</el-button>
@@ -40,7 +40,7 @@
           </el-tree>
         </el-col>
 
-        <el-col :span="18">
+        <el-col :span="16" style="position: fixed;top: 40px; right: 40px;z-index: 999;">
           <span class="title">基本信息</span>
           <el-form
             :model="ruleForm"

+ 27 - 1
src/views/material/requisition/details/index.vue

@@ -193,6 +193,30 @@ export default {
         this.count++;
       },
     },
+    "params.sysMaterialMedcineApply.isDrug": {
+      handler: function (nVal, oVal) {
+        if (nVal === "2") {
+          this.rules.registrationNo = [
+            {
+              required: true,
+              message: "注册证号/备案凭证编号",
+              trigger: "change",
+            },
+          ];
+          this.rules.medicalInstruments = [
+            {
+              required: true,
+              message: "管理类别",
+              trigger: "change",
+            },
+          ];
+        } else {
+          this.rules.registrationNo = null;
+          this.rules.medicalInstruments = null;
+        }
+        this.count++;
+      },
+    },
   },
   methods: {
     setVisible(prop) {
@@ -404,7 +428,9 @@ export default {
         this.loading = true;
         let params = await this.handleParams();
         if (params) {
-          let { code, msg } = await betchSubmit({ ids: [Number(params.id)] });
+          let { code, msg } = await betchSubmit({
+            ids: [Number(params.sysMaterialApply.id)],
+          });
           code == 200 && this.hide();
           this.$notify({
             type: code == 200 ? "success" : "error",

+ 27 - 6
src/views/purchase/PurchaseDemandList/add.vue

@@ -6,7 +6,7 @@
       <el-row :gutter="10">
         <el-col :span="1.5">
           <el-form-item label="业务类型" prop="billType" :rules="{ required: true, message: '请选择业务类型', trigger: 'blur' }">
-            <el-select clearable v-model="basicForm.billType" @change="changeBillType" :disabled="sonDisable" size="mini" style="width: 200px">
+            <el-select clearable v-model="basicForm.billType" @change="changeBillType(basicForm.billType)" :disabled="sonDisable" size="mini" style="width: 200px">
               <el-option v-for=" dict in dict.type.sys_business" :key="dict.value" :label="dict.label" :value="dict.value">
               </el-option>
             </el-select>
@@ -44,7 +44,7 @@
 
         <el-col :span="1.5">
           <el-form-item label="需求计划" prop="planType" :rules="{ required: true, message: '请选择需求计划', trigger: 'blur' }">
-            <el-select :disabled="sonDisable" v-model="basicForm.planType" size="mini" style="width: 200px" @change="changeplanType()">
+            <el-select :disabled="sonDisable" v-model="basicForm.planType" size="mini" style="width: 200px" @change="changeplanType(basicForm.planType)">
               <el-option v-for="dict in dict.type.sys_plan_type" :key="dict.value" :label="dict.label" :value="dict.value">
               </el-option>
             </el-select>
@@ -837,8 +837,21 @@ export default {
       }
     },
     // 改变需求计划改变需求日期
-    changeplanType() {
+    changeplanType(val) {
       this.dafaultDate()
+      console.log(val)
+      if (val == 'JJXQ') {
+        this.basicForm.billType = 'JJXQ'
+      } else {
+        if (this.basicForm.billType == 'JJXQ') {
+          this.basicForm.billType = ''
+        }
+      }
+      if (val == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
+        this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
+      } else {
+        this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'N'})
+      }
     },
     // 无限滚动加载配置
     load() {
@@ -858,8 +871,9 @@ export default {
       })
     },
     // 更改业务类型调整明细行内补单或紧急标识
-    changeBillType() {
-      if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
+    changeBillType(val) {
+      console.log(val)
+      if (val == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
         this.isBDXQ = true
         this.BDZT = false
         this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
@@ -872,7 +886,14 @@ export default {
           item.additionalSupplierName = null
         })
       }
-      if (this.basicForm.billType == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
+      if (val == 'JJXQ') {
+        this.basicForm.planType = 'JJXQ'
+      } else {
+        if (this.basicForm.planType == 'JJXQ') {
+          this.basicForm.planType = ''
+        }
+      }
+      if (val == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
         this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
       } else {
         this.basicForm.puDemandItemList.forEach(item => { item.isUrgency = 'N' })

+ 87 - 87
src/views/purchase/apply/add/columns.js

@@ -115,6 +115,13 @@ export default function useColumns() {
       },
       TableColumns: [
         {
+          item: { key: "materialCode", title: "物料编码", required: true },
+          attr: {
+            is: "el-input",
+            clearable: true,
+          },
+        },
+        {
           item: { key: "materialName", title: "物料名称", required: true },
           attr: {
             is: "el-popover-select-v2",
@@ -136,18 +143,11 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "materialCode", title: "物料编码", required: true },
-          attr: {
-            is: "el-input",
-            clearable: true,
-          }, 
-        },
-        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         {
-          item: { key: "unitName", title: "单位", hidden: false },
+          item: { key: "unitName", title: "单位" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -155,27 +155,37 @@ export default function useColumns() {
             dataMapping: { unit: "id", unitCode: "code", unitName: "name" },
           },
         },
+        // {
+        //   item: { key: "puUnitName", title: "采购单位", hidden: false },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "UNIT_PARAM",
+        //     dataMapping: {
+        //       puUnit: "id",
+        //       puUnitCode: "code",
+        //       puUnitName: "name",
+        //     },
+        //   },
+        // },
         {
-          item: { key: "puUnitName", title: "采购单位", hidden: false },
+          item: { key: "customerName", title: "客户" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
-            referName: "UNIT_PARAM",
+            referName: "CUSTOMER_PARAM",
             dataMapping: {
-              puUnit: "id",
-              puUnitCode: "code",
-              puUnitName: "name",
+              customer: "id",
+              customerCode: "code",
+              customerName: "name",
             },
           },
         },
         {
-          item: { key: "conversionRate", title: "采购换算率", required: true },
+          item: { key: "taxPrice", title: "含税单价", required: true },
           attr: {
             is: "el-input-number",
-            min: 0,
-            precision: CONFIG.precision,
-            value: 1,
-            disabled: true,
+            min: 0.00000001,
           },
         },
         {
@@ -189,13 +199,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "taxPrice", title: "含税单价", required: true },
-          attr: {
-            is: "el-input-number",
-            min: 0.00000001,
-          },
-        },
-        {
           item: { key: "price", title: "无税单价", required: true },
           attr: {
             formatter: (prop) => {
@@ -204,19 +207,19 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "currencyName", title: "币种" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CURRENCY_PARAM",
-            dataMapping: {
-              currency: "id",
-              currencyCode: "code",
-              currencyName: "name",
-            },
-          },
-        },
+        // {
+        //   item: { key: "currencyName", title: "币种" },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "CURRENCY_PARAM",
+        //     dataMapping: {
+        //       currency: "id",
+        //       currencyCode: "code",
+        //       currencyName: "name",
+        //     },
+        //   },
+        // },
         {
           item: {
             key: "periodBegin",
@@ -243,19 +246,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "customerName", title: "客户" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CUSTOMER_PARAM",
-            dataMapping: {
-              customer: "id",
-              customerCode: "code",
-              customerName: "name",
-            },
-          },
-        },
-        {
           item: { key: "recentlyPrice", title: "最近价格" },
           attr: {
             is: "el-input-number",
@@ -295,39 +285,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "priceType", title: "价格类型", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "sys_price_type",
-            value: "order",
-          },
-        },
-        {
-          item: { key: "isDistributionPrice", title: "配送价", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             formatter: (prop) => {
@@ -375,8 +332,40 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { key: "priceType", title: "价格类型", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "sys_price_type",
+            value: "order",
+          },
+        },
+        {
+          item: { key: "isDistributionPrice", title: "配送价", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
           item: { width: 150, key: "supplierName", title: "供应商名称1" },
           attr: { is: "el-input" },
         },
@@ -462,8 +451,8 @@ export default function useColumns() {
             precision: CONFIG.precision,
           },
         },
-        { item: { key: "createByName", title: "创建人名称" }, attr: {} },
-        { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
+        // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         {
           item: { key: "isPriceAdjustment", title: "", width: 10 },
           attr: {
@@ -474,6 +463,17 @@ export default function useColumns() {
             },
           },
         },
+        // 采购换算率隐藏
+        {
+          item: { key: "conversionRate", title: "", required: true, width: 5 },
+          attr: {
+            is: "el-input-number",
+            min: 0,
+            precision: CONFIG.precision,
+            value: 1,
+            disabled: true,
+          },
+        },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/add/index.vue

@@ -530,6 +530,7 @@
         >
           <div v-loading="loading" style="height: 250px; display: flex">
             <el-super-ux-table
+              index
               v-model="params[item.key]"
               :dict="dict"
               :ref="tabName"

+ 87 - 87
src/views/purchase/apply/copy/columns.js

@@ -115,6 +115,13 @@ export default function useColumns() {
       },
       TableColumns: [
         {
+          item: { key: "materialCode", title: "物料编码", required: true },
+          attr: {
+            is: "el-input",
+            clearable: true,
+          },
+        },
+        {
           item: { key: "materialName", title: "物料名称", required: true },
           attr: {
             is: "el-popover-select-v2",
@@ -136,18 +143,11 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "materialCode", title: "物料编码", required: true },
-          attr: {
-            is: "el-input",
-            clearable: true,
-          },
-        },
-        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         {
-          item: { key: "unitName", title: "单位", hidden: false },
+          item: { key: "unitName", title: "单位"},
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -155,27 +155,37 @@ export default function useColumns() {
             dataMapping: { unit: "id", unitCode: "code", unitName: "name" },
           },
         },
+        // {
+        //   item: { key: "puUnitName", title: "采购单位", hidden: false },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "UNIT_PARAM",
+        //     dataMapping: {
+        //       puUnit: "id",
+        //       puUnitCode: "code",
+        //       puUnitName: "name",
+        //     },
+        //   },
+        // },
         {
-          item: { key: "puUnitName", title: "采购单位", hidden: false },
+          item: { key: "customerName", title: "客户" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
-            referName: "UNIT_PARAM",
+            referName: "CUSTOMER_PARAM",
             dataMapping: {
-              puUnit: "id",
-              puUnitCode: "code",
-              puUnitName: "name",
+              customer: "id",
+              customerCode: "code",
+              customerName: "name",
             },
           },
         },
         {
-          item: { key: "conversionRate", title: "采购换算率", required: true },
+          item: { key: "taxPrice", title: "含税单价", required: true },
           attr: {
             is: "el-input-number",
-            min: 0,
-            precision: CONFIG.precision,
-            value: 1,
-            disabled: true,
+            min: 0.00000001,
           },
         },
         {
@@ -189,13 +199,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "taxPrice", title: "含税单价", required: true },
-          attr: {
-            is: "el-input-number",
-            min: 0.00000001,
-          },
-        },
-        {
           item: { key: "price", title: "无税单价", required: true },
           attr: {
             formatter: (prop) => {
@@ -204,19 +207,19 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "currencyName", title: "币种" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CURRENCY_PARAM",
-            dataMapping: {
-              currency: "id",
-              currencyCode: "code",
-              currencyName: "name",
-            },
-          },
-        },
+        // {
+        //   item: { key: "currencyName", title: "币种" },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "CURRENCY_PARAM",
+        //     dataMapping: {
+        //       currency: "id",
+        //       currencyCode: "code",
+        //       currencyName: "name",
+        //     },
+        //   },
+        // },
         {
           item: {
             key: "periodBegin",
@@ -243,19 +246,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "customerName", title: "客户" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CUSTOMER_PARAM",
-            dataMapping: {
-              customer: "id",
-              customerCode: "code",
-              customerName: "name",
-            },
-          },
-        },
-        {
           item: { key: "recentlyPrice", title: "最近价格" },
           attr: {
             is: "el-input-number",
@@ -295,39 +285,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "priceType", title: "价格类型", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "sys_price_type",
-            value: "order",
-          },
-        },
-        {
-          item: { key: "isDistributionPrice", title: "配送价", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             formatter: (prop) => {
@@ -376,8 +333,40 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { key: "priceType", title: "价格类型", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "sys_price_type",
+            value: "order",
+          },
+        },
+        {
+          item: { key: "isDistributionPrice", title: "配送价", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
           item: { width: 150, key: "supplierName", title: "供应商名称1" },
           attr: { is: "el-input" },
         },
@@ -463,8 +452,8 @@ export default function useColumns() {
             precision: CONFIG.precision,
           },
         },
-        { item: { key: "createByName", title: "创建人名称" }, attr: {} },
-        { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
+        // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         {
           item: { key: "isPriceAdjustment", title: "", width: 10 },
           attr: {
@@ -475,6 +464,17 @@ export default function useColumns() {
             },
           },
         },
+        // 采购换算率隐藏
+        {
+          item: { key: "conversionRate", title: "采购换算率", required: true, width: 5 },
+          attr: {
+            is: "el-input-number",
+            min: 0,
+            precision: CONFIG.precision,
+            value: 1,
+            disabled: true,
+          },
+        },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/copy/index.vue

@@ -581,6 +581,7 @@
         >
           <div v-loading="loading" style="height: 250px; display: flex">
             <el-super-ux-table
+              index
               v-model="params[item.key]"
               :dict="dict"
               :ref="tabName"

+ 87 - 87
src/views/purchase/apply/edit/columns.js

@@ -115,6 +115,13 @@ export default function useColumns() {
       },
       TableColumns: [
         {
+          item: { key: "materialCode", title: "物料编码", required: true },
+          attr: {
+            is: "el-input",
+            clearable: true,
+          },
+        },
+        {
           item: { key: "materialName", title: "物料名称", required: true },
           attr: {
             is: "el-popover-select-v2",
@@ -136,18 +143,11 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "materialCode", title: "物料编码", required: true },
-          attr: {
-            is: "el-input",
-            clearable: true,
-          },
-        },
-        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         {
-          item: { key: "unitName", title: "单位", hidden: false },
+          item: { key: "unitName", title: "单位" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -155,27 +155,37 @@ export default function useColumns() {
             dataMapping: { unit: "id", unitCode: "code", unitName: "name" },
           },
         },
+        // {
+        //   item: { key: "puUnitName", title: "采购单位", hidden: false },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "UNIT_PARAM",
+        //     dataMapping: {
+        //       puUnit: "id",
+        //       puUnitCode: "code",
+        //       puUnitName: "name",
+        //     },
+        //   },
+        // },
         {
-          item: { key: "puUnitName", title: "采购单位", hidden: false },
+          item: { key: "customerName", title: "客户" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
-            referName: "UNIT_PARAM",
+            referName: "CUSTOMER_PARAM",
             dataMapping: {
-              puUnit: "id",
-              puUnitCode: "code",
-              puUnitName: "name",
+              customer: "id",
+              customerCode: "code",
+              customerName: "name",
             },
           },
         },
         {
-          item: { key: "conversionRate", title: "采购换算率", required: true },
+          item: { key: "taxPrice", title: "含税单价", required: true },
           attr: {
             is: "el-input-number",
-            min: 0,
-            precision: CONFIG.precision,
-            value: 1,
-            disabled: true,
+            min: 0.00000001,
           },
         },
         {
@@ -189,13 +199,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "taxPrice", title: "含税单价", required: true },
-          attr: {
-            is: "el-input-number",
-            min: 0.00000001,
-          },
-        },
-        {
           item: { key: "price", title: "无税单价", required: true },
           attr: {
             formatter: (prop) => {
@@ -204,19 +207,19 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "currencyName", title: "币种" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CURRENCY_PARAM",
-            dataMapping: {
-              currency: "id",
-              currencyCode: "code",
-              currencyName: "name",
-            },
-          },
-        },
+        // {
+        //   item: { key: "currencyName", title: "币种" },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "CURRENCY_PARAM",
+        //     dataMapping: {
+        //       currency: "id",
+        //       currencyCode: "code",
+        //       currencyName: "name",
+        //     },
+        //   },
+        // },
         {
           item: {
             key: "periodBegin",
@@ -243,19 +246,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "customerName", title: "客户" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CUSTOMER_PARAM",
-            dataMapping: {
-              customer: "id",
-              customerCode: "code",
-              customerName: "name",
-            },
-          },
-        },
-        {
           item: { key: "recentlyPrice", title: "最近价格" },
           attr: {
             is: "el-input-number",
@@ -295,39 +285,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "priceType", title: "价格类型", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "sys_price_type",
-            value: "order",
-          },
-        },
-        {
-          item: { key: "isDistributionPrice", title: "配送价", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             formatter: (prop) => {
@@ -376,8 +333,40 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { key: "priceType", title: "价格类型", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "sys_price_type",
+            value: "order",
+          },
+        },
+        {
+          item: { key: "isDistributionPrice", title: "配送价", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
           item: { width: 150, key: "supplierName", title: "供应商名称1" },
           attr: { is: "el-input" },
         },
@@ -463,8 +452,8 @@ export default function useColumns() {
             precision: CONFIG.precision,
           },
         },
-        { item: { key: "createByName", title: "创建人名称" }, attr: {} },
-        { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
+        // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         {
           item: { key: "isPriceAdjustment", title: "", width: 10 },
           attr: {
@@ -475,6 +464,17 @@ export default function useColumns() {
             },
           },
         },
+        // 采购换算率隐藏
+        {
+          item: { key: "conversionRate", title: "采购换算率", required: true, width: 5 },
+          attr: {
+            is: "el-input-number",
+            min: 0,
+            precision: CONFIG.precision,
+            value: 1,
+            disabled: true,
+          },
+        },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/edit/index.vue

@@ -597,6 +597,7 @@
         >
           <div v-loading="loading" style="height: 250px; display: flex">
             <el-super-ux-table
+              index
               v-model="priceApply[item.key]"
               :dict="dict"
               :ref="tabName"

+ 59 - 60
src/views/purchase/apply/see/columns.js

@@ -77,29 +77,42 @@ export default function useColumns() {
       },
       TableColumns: [
         {
-          item: { width: 100, key: "materialName", title: "物料名称" },
+          item: { width: 100, key: "materialCode", title: "物料编码" },
           attr: {},
         },
         {
-          item: { width: 100, key: "materialCode", title: "物料编码" },
+          item: { width: 100, key: "materialName", title: "物料名称" },
           attr: {},
         },
+        { item: { width: 100, key: "specification", title: "规格" }, attr: {} },
+        { item: { width: 100, key: "model", title: "型号" }, attr: {} },
         {
           item: { width: 100, key: "manufacturerName", title: "生产厂家" },
           attr: {},
         },
-        { item: { width: 100, key: "specification", title: "规格" }, attr: {} },
-        { item: { width: 100, key: "model", title: "型号" }, attr: {} },
         {
           item: { width: 100, key: "unitName", title: "单位" },
           attr: {},
         },
+        // {
+        //   item: { width: 100, key: "puUnitName", title: "采购单位" },
+        //   attr: {},
+        // },
+        // {
+        //   item: { width: 100, key: "conversionRate", title: "采购换算率" },
+        //   attr: {
+        //     is: "el-computed-input-v2",
+        //     formatter: (prop) => {
+        //       return prop == null ? 0 : (prop * 1);
+        //     },
+        //   },
+        // },
         {
-          item: { width: 100, key: "puUnitName", title: "采购单位" },
+          item: { width: 100, key: "customerName", title: "客户" },
           attr: {},
         },
         {
-          item: { width: 100, key: "conversionRate", title: "采购换算率" },
+          item: { width: 100, key: "taxPrice", title: "含税单价" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
@@ -117,15 +130,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { width: 100, key: "taxPrice", title: "含税单价" },
-          attr: {
-            is: "el-computed-input-v2",
-            formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
-            },
-          },
-        },
-        {
           item: { width: 100, key: "price", title: "无税单价" },
           attr: {
             is: "el-computed-input-v2",
@@ -134,10 +138,10 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { width: 100, key: "currencyName", title: "币种" },
-          attr: {},
-        },
+        // {
+        //   item: { width: 100, key: "currencyName", title: "币种" },
+        //   attr: {},
+        // },
         {
           item: { width: 100, key: "periodBegin", title: "价格有效期(起)" },
           attr: {},
@@ -147,10 +151,6 @@ export default function useColumns() {
           attr: {},
         },
         {
-          item: { width: 100, key: "customerName", title: "客户" },
-          attr: {},
-        },
-        {
           item: { width: 100, key: "recentlyPrice", title: "最近价格" },
           attr: {},
         },
@@ -175,35 +175,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { width: 100, key: "priceType", title: "价格类型" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "sys_price_type",
-          },
-        },
-        {
-          item: { width: 100, key: "isDistributionPrice", title: "配送价" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "is_effective",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "is_effective",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "is_effective",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             is: "el-computed-input-v2",
@@ -250,8 +221,36 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { width: 100, key: "priceType", title: "价格类型" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "sys_price_type",
+          },
+        },
+        {
+          item: { width: 100, key: "isDistributionPrice", title: "配送价" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "is_effective",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "is_effective",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "is_effective",
+          },
+        },
+        {
           item: { width: 100, key: "supplierName", title: "供应商名称1" },
           attr: {},
         },
@@ -347,14 +346,14 @@ export default function useColumns() {
           },
         },
 
-        {
-          item: { width: 100, key: "createByName", title: "创建人名称" },
-          attr: {},
-        },
-        {
-          item: { width: 100, key: "updateByName", title: "更新人名称" },
-          attr: {},
-        },
+        // {
+        //   item: { width: 100, key: "createByName", title: "创建人名称" },
+        //   attr: {},
+        // },
+        // {
+        //   item: { width: 100, key: "updateByName", title: "更新人名称" },
+        //   attr: {},
+        // },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/see/index.vue

@@ -186,6 +186,7 @@ export default {
           lazy
         >
           <el-super-table
+            index
             v-model="params[item.key]"
             :size="$attrs.size"
             :dict="dict"

+ 1 - 1
src/views/purchase/equipmentData/add.vue

@@ -59,7 +59,7 @@
         <el-row>
           <el-col :span="1.5">
             <el-form-item label="是否项目/厂家年度授权" prop="isProjectOrFactoryEmpower">
-              <el-checkbox true-label= '0' false-label= '2' v-model="basicForm.isProjectOrFactoryEmpower"></el-checkbox>
+              <el-checkbox :disabled="sonDisable" true-label= '0' false-label= '2' v-model="basicForm.isProjectOrFactoryEmpower"></el-checkbox>
             </el-form-item>
           </el-col>
         </el-row>

+ 77 - 0
src/views/purchase/purchase-order/close/allClose.vue

@@ -0,0 +1,77 @@
+<!-- 整单关闭 -->
+<script>
+import orderApi from "@/api/business/purchase/purchase-order";
+export default {
+  name: "AllClose",
+  props: {
+    selectData: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      title: "整单关闭",
+    };
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.$props.selectData;
+      },
+      set() {},
+    },
+    disabled: {
+      get() {
+        let { innerValue } = this;
+
+        if (
+          innerValue.length === 1 &&
+          innerValue[0].status == 2 &&
+          innerValue[0].isEnd === "N"
+        ) {
+          return false;
+        }
+        return true;
+      },
+      set() {},
+    },
+  },
+  methods: {
+    open() {
+      // 未审批状态下整单关闭
+      this.$prompt("请输入关闭原因", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPattern: /\s*\S+?/,
+        inputErrorMessage: "关闭原因不能为空",
+      })
+        .then(async ({ value }) => {
+          let { innerValue } = this;
+          try {
+            let puOrderIds = innerValue.map((order) => Number(order.id));
+
+            let { code } = await orderApi.close({
+              puOrderIds,
+              closeReason: value,
+            });
+
+            if (code === 200) {
+              this.$emit("submit");
+              this.$notify.success({
+                message: msg,
+              });
+            }
+          } catch (error) {}
+        })
+        .catch(() => {});
+    },
+  },
+  created() {},
+};
+</script>
+<template>
+  <el-button :size="$attrs.size" @click="open" :disabled="disabled">{{
+    title
+  }}</el-button>
+</template>

+ 66 - 0
src/views/purchase/purchase-order/close/itemClose.vue

@@ -0,0 +1,66 @@
+<!-- 行关闭 -->
+<script>
+import orderApi from "@/api/business/purchase/purchase-order";
+export default {
+  name: "itemClose",
+  props: {
+    selectData: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      title: "行关闭",
+    };
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.$props.selectData;
+      },
+      set() {},
+    },
+  },
+  methods: {
+    async open() {
+      let { innerValue } = this;
+
+      let data = innerValue.find((item) => item.isPayment === "Y");
+
+      if (!data) {
+        this.$confirm("是否继续此操作?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            try {
+              let puOrderIds = innerValue.map((order) => Number(order.id));
+
+              let { code } = await orderApi.itemClose({
+                puOrderIds,
+              });
+
+              if (code === 200) {
+                this.$emit("submit");
+                this.$notify.success({
+                  message: msg,
+                });
+              }
+            } catch (error) {}
+          })
+          .catch(() => {});
+      } else {
+        this.$notify.warning({
+          message: "存在已经完成关闭的行",
+        });
+      }
+    },
+  },
+  created() {},
+};
+</script>
+<template>
+  <el-button :size="$attrs.size" @click="open">{{ title }}</el-button>
+</template>

+ 62 - 0
src/views/purchase/purchase-order/close/itemOpen.vue

@@ -0,0 +1,62 @@
+<!-- 行打开 -->
+<script>
+import orderApi from "@/api/business/purchase/purchase-order";
+export default {
+  name: "itemOpen",
+  props: {
+    selectData: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      title: "行打开",
+    };
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.$props.selectData;
+      },
+      set() {},
+    },
+  },
+  methods: {
+    async open() {
+      let { innerValue } = this;
+      let data = innerValue.find((item) => item.isPayment === "N");
+      if (!data) {
+        this.$confirm("是否继续此操作?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            try {
+              let puOrderIds = innerValue.map((order) => Number(order.id));
+              let { code } = await orderApi.itemOpen({
+                puOrderIds,
+              });
+              if (code === 200) {
+                this.$emit("submit");
+                this.$notify.success({
+                  message: msg,
+                });
+              }
+            } catch (error) {}
+          })
+          .catch(() => {});
+      } else {
+        this.$notify.warning({
+          message: "存在已经完成打开的行",
+        });
+      }
+    },
+  },
+  created() {},
+};
+</script>
+<template>
+  <el-button :size="$attrs.size" @click="open">{{ title }}</el-button>
+</template>

+ 23 - 28
src/views/purchase/purchase-order/index.vue

@@ -33,6 +33,9 @@ export default {
     Retrieve: () => import("@/components/Retrieve/index.vue"),
     ZpButton: () => import("./zhuan-pai/index.vue"),
     ZpjlButton: () => import("./zhuan-pai/record.vue"),
+    ZdgbButton: () => import("./close/allClose.vue"),
+    HgbButton: () => import("./close/itemClose.vue"),
+    HdkButton: () => import("./close/itemOpen.vue"),
     QueryScheme: () => import("@/components/query-scheme/index.vue"),
   },
   data() {
@@ -541,36 +544,14 @@ export default {
             if (code === 200) {
               this.handleRefreshList();
             }
+            this.$notify.success({
+              message: msg,
+            });
           } catch (error) {}
         })
         .catch(() => {});
     },
-    // 判断是否满足整单关闭
-    judgeIsAllClose() {
-      if (this.checkedList.length == 1) {
-        // if (this.checkedList[0].status == 0) {
-        if (this.judgeIsOption("allClose", this.checkedList[0])) {
-          // 未审批状态下整单关闭
-          return false;
-        }
-      }
-      return true;
-    },
-    // 整单关闭
-    handleAllClose() {
-      // 未审批状态下整单关闭
-      try {
-        this.handleConfirmTips(async () => {
-          let puOrderIds = this.checkedList.map((order) => Number(order.id));
 
-          let { code } = await orderApi.close({ puOrderIds });
-
-          if (code === 200) {
-            this.handleRefreshList();
-          }
-        });
-      } catch (error) {}
-    },
     // 付款协议
     async handlePaymentRequest() {
       // name:工号
@@ -662,8 +643,8 @@ export default {
               source.status == "9") &&
             source.isEnd === "N"
           );
-        case "allClose":
-          return source.status == 0 && source.isEnd === "N";
+        // case "allClose":
+        //   return source.status == 2 && source.isEnd === "N";
         case "return":
           return (
             source.source != 3 &&
@@ -750,7 +731,11 @@ export default {
             :disabled="judgeIsAllReturn()"
             >整单退回</el-button
           >
-          <!-- <el-button :size="size" @click="handleAllClose" :disabled="judgeIsAllClose()">整单关闭</el-button> -->
+          <zdgb-button
+            :select-data="checkedList"
+            :size="size"
+            @submit="handleRefreshList"
+          ></zdgb-button>
         </el-button-group>
 
         <el-button-group style="margin: 0 10px">
@@ -866,6 +851,16 @@ export default {
           :disabled="judgeIsLineReturn()"
           >行退回</el-button
         >
+        <hgb-button
+          :select-data="checkedTabList"
+          :size="size"
+          @submit="handleRefreshList"
+        ></hgb-button>
+        <hdk-button
+          :select-data="checkedTabList"
+          :size="size"
+          @submit="handleRefreshList"
+        ></hdk-button>
       </el-row>
       <el-tabs
         v-model="tabName"