Эх сурвалжийг харах

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

001295 1 жил өмнө
parent
commit
738e3d746d

+ 77 - 74
src/views/material/changeApply/columns.js

@@ -47,52 +47,54 @@ export default function useColumns() {
         },
       },
     },
-    // {
-    //   item:{
-    //     key: "manufacturerIdName",
-    //     title: "生产厂家/代理人",  
-    //   },
-    //   attr:{
-    //     clearable:true,
-    //     is: "el-popover-select-v2",
-    //     valueKey: "name",
-    //     referName: "MANUFACTURER_PARAM",
-    //     dataMapping: {
-    //       manufacturerId: "id",
-    //     },
-    //   },
-    // },
-    // {
-    //   item:{
-    //     key: "approverName",
-    //     title: "申请人",
-    //   },
-    //   attr: {
-    //     clearable:true,
-    //     is: "el-popover-select-v2",
-    //     referName: "CONTACTS_PARAM",
-    //     valueKey: "name",
-    //     dataMapping: {
-    //       approver: "code",
-    //     },
-    //   },
-    // },
-    // {
-    //   item:{
-    //     key: "applicationTime",
-    //     title: "申请日期",
-    //    // span:12,
-    //   },
-    //   attr: {
-    //     clearable:true,
-    //     is: "el-date-picker",
-    //     type:"daterange",
-    //     rangeSeparator:"-",
-    //     startPlaceholder:"开始日期",
-    //     endPlaceholder:"结束日期",
-    //     valueFormat:"yyyy-MM-dd",
-    //   },
-    // },
+    {
+      item:{
+        key: "manufacturerIdName",
+        title: "生产厂家/代理人",  
+      },
+      attr:{
+        clearable:true,
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "MANUFACTURER_PARAM",
+        dataMapping: {
+          manufacturerId: "id",
+        },
+      },
+    },
+    {
+      item:{
+        // key: "approverName",
+        key: "createByName",
+        title: "申请人",
+      },
+      attr: {
+        clearable:true,
+        is: "el-popover-select-v2",
+        referName: "CONTACTS_PARAM",
+        valueKey: "name",
+        dataMapping: {
+          // approver: "code",
+          createBy: "code",
+        },
+      },
+    },
+    {
+      item:{
+        key: "applyTimeArray",
+        title: "申请日期",
+       // span:12,
+      },
+      attr: {
+        clearable:true,
+        is: "el-date-picker",
+        type:"daterange",
+        rangeSeparator:"-",
+        startPlaceholder:"开始日期",
+        endPlaceholder:"结束日期",
+        valueFormat:"yyyy-MM-dd",
+      },
+    },
     {
       item: {
         key: "code",
@@ -111,34 +113,35 @@ export default function useColumns() {
         clearable: true,
       },
     },
-    // {
-    //   item: {
-    //     key: "classifys",
-    //     title: "物料分类",
-    //   },
-    //   attr: {
-    //     is: "el-popover-multiple-tree-select",
-    //     referName: "MATERIALCLASSIFY_PARAM",
-    //     valueKey: "id",
-    //     clearable:true,
-    //   },
-    // },
-    // {
-    //   item:{
-    //     key: "updateTime",
-    //     title: "修改日期",
-    //    // span:12,
-    //   },
-    //   attr: {
-    //     clearable:true,
-    //     is: "el-date-picker",
-    //     type:"daterange",
-    //     rangeSeparator:"-",
-    //     startPlaceholder:"开始日期",
-    //     endPlaceholder:"结束日期",
-    //     valueFormat:"yyyy-MM-dd",
-    //   },
-    // },
+    {
+      item: {
+        key: "materialClassifyIds",
+        title: "物料分类",
+      },
+      attr: {
+        is: "el-popover-multiple-tree-select",
+        // is: "el-popover-tree-select",
+        referName: "MATERIALCLASSIFY_PARAM",
+        valueKey: "id",
+        clearable:true,
+      },
+    },
+    {
+      item:{
+        key: "updateTimeArray",
+        title: "修改日期",
+       // span:12,
+      },
+      attr: {
+        clearable:true,
+        is: "el-date-picker",
+        type:"daterange",
+        rangeSeparator:"-",
+        startPlaceholder:"开始日期",
+        endPlaceholder:"结束日期",
+        valueFormat:"yyyy-MM-dd",
+      },
+    },
 
     // {
     //   item: { key: "materialName", title: "物料名称" },

+ 1 - 0
src/views/purchase/DemandSummary/add.vue

@@ -58,6 +58,7 @@
             <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">
           <template slot-scope="scope">

+ 51 - 50
src/views/purchase/DemandSummary/index.vue

@@ -263,111 +263,112 @@
         >
           <vxe-column type="checkbox" width="50" fixed="left"/>
           <vxe-column show-header-overflow show-overflow  title="序号" type="seq" align="center" width="50px" fixed="left"/>
-          <!-- <vxe-column show-header-overflow show-overflow v-if="showColumn.status" title="行号" align="center" field="rowNo"/> -->
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.status" title="行状态" align="center" field="status" width="50px" :formatter="hangStatus"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.finalBuyQty" title="最终采购量" align="center" field="finalBuyQty" width="80px">
+          <!-- <vxe-column show-header-overflow show-overflow title="行号" align="center" field="rowNo"/> -->
+          <vxe-column show-header-overflow show-overflow title="行状态" align="center" field="status" width="50px" :formatter="hangStatus"/>
+          <vxe-column show-header-overflow show-overflow title="最终采购量" align="center" field="finalBuyQty" width="80px">
             <template slot-scope="scope">
                 <el-input size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty" @change="jilu(scope.$rowIndex)"/>
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.artificialAdjust" title="人工调整数" align="center" field="artificialAdjust" width="50px">
+          <vxe-column show-header-overflow show-overflow title="关闭数量" align="center" field="closeQty" width="50px"/>
+          <vxe-column show-header-overflow show-overflow title="人工调整数" align="center" field="artificialAdjust" width="50px">
             <template slot-scope="scope">
               {{scope.row.artificialAdjust = scope.row.finalBuyQty - scope.row.suggestionPurchase}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.materialClassifyOneName" title="一级品类" align="center" field="materialClassifyOneName" width="80"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.materialCode" title="物料编码" align="center" field="materialCode" width="100px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.materialName" title="品名" align="center" field="materialName" width="100px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.specification" title="规格" align="center" field="specification" width="100px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.unit" title="单位" align="center" field="unit" width="50"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.manufacturer" title="生产厂家/代理人" align="center" field="manufacturer" width="100px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.demandNum" title="需求单位数" align="center" field="demandNum" width="50px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.netDemandNum" title="总最终净需求量" align="center" field="netDemandNum" width="80px">
+          <vxe-column show-header-overflow show-overflow title="一级品类" align="center" field="materialClassifyOneName" width="80"/>
+          <vxe-column show-header-overflow show-overflow title="物料编码" align="center" field="materialCode" width="100px"/>
+          <vxe-column show-header-overflow show-overflow title="品名" align="center" field="materialName" width="100px"/>
+          <vxe-column show-header-overflow show-overflow title="规格" align="center" field="specification" width="100px"/>
+          <vxe-column show-header-overflow show-overflow title="单位" align="center" field="unit" width="50"/>
+          <vxe-column show-header-overflow show-overflow title="生产厂家/代理人" align="center" field="manufacturer" width="100px"/>
+          <vxe-column show-header-overflow show-overflow title="需求单位数" align="center" field="demandNum" width="50px"/>
+          <vxe-column show-header-overflow show-overflow title="总最终净需求量" align="center" field="netDemandNum" width="80px">
             <template slot-scope="scope">
               {{scope.row.netDemandNum ? parseFloat(scope.row.netDemandNum).toFixed(2) : '0.00'}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.evensalesforyear" title="近1月月均需求" align="center" field="evensalesforyear" width="50">
+          <vxe-column show-header-overflow show-overflow title="近1月月均需求" align="center" field="evensalesforyear" width="50">
             <template slot-scope="scope">
               {{scope.row.evensalesforyear ? parseFloat(scope.row.evensalesforyear).toFixed(2) : '0.00'}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.evensalesforthrmonth" title="近3月月均需求" align="center" field="evensalesforthrmonth" width="50">
+          <vxe-column show-header-overflow show-overflow title="近3月月均需求" align="center" field="evensalesforthrmonth" width="50">
             <template slot-scope="scope">
               {{scope.row.evensalesforthrmonth ? parseFloat(scope.row.evensalesforthrmonth).toFixed(2) : '0.00'}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.totalMonthlySales" title="总月销量" align="center" field="totalMonthlySales" width="50">
+          <vxe-column show-header-overflow show-overflow title="总月销量" align="center" field="totalMonthlySales" width="50">
             <template slot-scope="scope">
               {{scope.row.totalMonthlySales ? parseFloat(scope.row.totalMonthlySales).toFixed(2) : '0.00'}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.demandCycle" title="需求可用周期" align="center" field="demandCycle" width="50px">
+          <vxe-column show-header-overflow show-overflow title="需求可用周期" align="center" field="demandCycle" width="50px">
             <template slot-scope="scope">
               {{scope.row.demandCycle ? parseFloat(scope.row.demandCycle).toFixed(1) : '-'}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.dullQut" title="呆滞量" align="center" field="dullQut" width="50px">
+          <vxe-column show-header-overflow show-overflow title="呆滞量" align="center" field="dullQut" width="50px">
             <template slot-scope="scope">
               {{parseFloat(scope.row.dullQut).toFixed(2)}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.buyPeriod" title="采购周期" align="center" field="buyPeriod" width="50px" />
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.centralPublicStock" title="中心公共库存" align="center" field="centralPublicStock" width="50"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.centralWarehouse" title="中心仓专属货位" align="center" field="centralWarehouse" width="50"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.eachWarehouseStock" title="各项目仓库存" align="center" field="eachWarehouseStock" width="50"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.commerceWarehouse" title="电商仓库" align="center" field="commerceWarehouse"  width="50" />
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.regionPublicStock" title="区域分仓公共库存" align="center" field="regionPublicStock" width="50"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.buyTransit" title="采购在途" align="center" field="buyTransit"  width="80px" />
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.lendTransit" title="借出在途" align="center" field="lendTransit"  width="80px" />
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.transferTransit" title="调拨在途" align="center" field="transferTransit"  width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.stockTotal" title="库存总计" align="center" field="stockTotal" width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.minPackage" title="最小包装量" align="center" field="minPackage"  width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.minOrder" title="最小订货量" align="center" field="minOrder"  width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.minBatch" title="最小批量" align="center" field="minBatch"  width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.modifyReason" title="修改原因" align="center" field="modifyReason" width="150px">
+          <vxe-column show-header-overflow show-overflow title="采购周期" align="center" field="buyPeriod" width="50px" />
+          <vxe-column show-header-overflow show-overflow title="中心公共库存" align="center" field="centralPublicStock" width="50"/>
+          <vxe-column show-header-overflow show-overflow title="中心仓专属货位" align="center" field="centralWarehouse" width="50"/>
+          <vxe-column show-header-overflow show-overflow title="各项目仓库存" align="center" field="eachWarehouseStock" width="50"/>
+          <vxe-column show-header-overflow show-overflow title="电商仓库" align="center" field="commerceWarehouse"  width="50" />
+          <vxe-column show-header-overflow show-overflow title="区域分仓公共库存" align="center" field="regionPublicStock" width="50"/>
+          <vxe-column show-header-overflow show-overflow title="采购在途" align="center" field="buyTransit"  width="80px" />
+          <vxe-column show-header-overflow show-overflow title="借出在途" align="center" field="lendTransit"  width="80px" />
+          <vxe-column show-header-overflow show-overflow title="调拨在途" align="center" field="transferTransit"  width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="库存总计" align="center" field="stockTotal" width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="最小包装量" align="center" field="minPackage"  width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="最小订货量" align="center" field="minOrder"  width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="最小批量" align="center" field="minBatch"  width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="修改原因" align="center" field="modifyReason" width="150px">
             <template slot-scope="scope">
                 <el-input size="mini" :disabled="scope.row.status !== '1'|| lineDisable || scope.row.artificialAdjust == '0'" v-model="scope.row.modifyReason" @change="jilu(scope.$rowIndex)"/>
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.suggestionPurchase" title="建议采购量" align="center" field="suggestionPurchase"  width="80px"/>
-          <!-- <vxe-column show-header-overflow show-overflow v-if="showColumn.status" title="建议净采购量" align="center" field="suggestBuyQty" width="100px"/> -->
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.materialClassifyTwoName" title="二级品类" align="center" field="materialClassifyTwoName" width="120px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.materialClassifyThreeName" title="三级品类" align="center" field="materialClassifyThreeName" width="120px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.materialClassifyFourName" title="四级品类" align="center" field="materialClassifyFourName" width="120px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.buyerName" title="采购员" align="center" field="buyerName" width="150px">
+          <vxe-column show-header-overflow show-overflow title="建议采购量" align="center" field="suggestionPurchase"  width="80px"/>
+          <!-- <vxe-column show-header-overflow show-overflow title="建议净采购量" align="center" field="suggestBuyQty" width="100px"/> -->
+          <vxe-column show-header-overflow show-overflow title="二级品类" align="center" field="materialClassifyTwoName" width="120px"/>
+          <vxe-column show-header-overflow show-overflow title="三级品类" align="center" field="materialClassifyThreeName" width="120px"/>
+          <vxe-column show-header-overflow show-overflow title="四级品类" align="center" field="materialClassifyFourName" width="120px"/>
+          <vxe-column show-header-overflow show-overflow title="采购员" align="center" field="buyerName" width="150px">
             <template slot-scope="scope">
                 <el-input readonly :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.buyerName">
                   <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseSon(scope.$rowIndex, 'CONTACTS_PARAM', true, '明细采购员')"></el-button>
                 </el-input>
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.purchaseOrgName" title="默认采购组织" align="center" field="purchaseOrgName" width="150px">
+          <vxe-column show-header-overflow show-overflow title="默认采购组织" align="center" field="purchaseOrgName" width="150px">
             <!-- <template slot-scope="scope">
                 <el-input readonly :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.purchaseOrgName">
                   <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseSon(scope.$index, 'ORG_PARAM', true, '明细默认采购组织')"></el-button>
                 </el-input>
             </template> -->
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.validityPeriod" title="有效期" align="center" field="validityPeriod"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.validityPeriodUnit" title="有效期单位" align="center" field="validityPeriodUnit" width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.businessType" title="业务类型" align="center" field="businessType" :formatter="formatterBusinessType"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.safetyStock" title="安全库存量" align="center" field="safetyStock" width="80px">
+          <vxe-column show-header-overflow show-overflow title="有效期" align="center" field="validityPeriod"/>
+          <vxe-column show-header-overflow show-overflow title="有效期单位" align="center" field="validityPeriodUnit" width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="业务类型" align="center" field="businessType" :formatter="formatterBusinessType"/>
+          <vxe-column show-header-overflow show-overflow title="安全库存量" align="center" field="safetyStock" width="80px">
             <template slot-scope="scope">
               {{scope.row.safetyStock ? parseFloat(scope.row.safetyStock).toFixed(2) : '0.00'}}
             </template>
           </vxe-column>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.billSource" title="单据来源" align="center" field="billSource" :formatter="formatterSource"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.registrant" title="注册人" align="center" field="registrant" width="120px"/>
+          <vxe-column show-header-overflow show-overflow title="单据来源" align="center" field="billSource" :formatter="formatterSource"/>
+          <vxe-column show-header-overflow show-overflow title="注册人" align="center" field="registrant" width="120px"/>
           <!-- <vxe-column title="可用量" align="center" field="qty"/> -->
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.buyDiscrepancy" title="总需与终采差异" align="center" field="buyDiscrepancy" width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.forecastClassification" title="集团预测分类" align="center" field="forecastClassification" width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.centerBinPossession" title="中心仓占有量" align="center" field="centerBinPossession" width="80px"/>
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.centralWarehouseAvailable" title="中心仓可用量" align="center" field="centralWarehouseAvailable" width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="总需与终采差异" align="center" field="buyDiscrepancy" width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="集团预测分类" align="center" field="forecastClassification" width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="中心仓占有量" align="center" field="centerBinPossession" width="80px"/>
+          <vxe-column show-header-overflow show-overflow title="中心仓可用量" align="center" field="centralWarehouseAvailable" width="80px"/>
           <!-- <vxe-column title="物料类别" align="center" field="materialCategory" width="150px"/> -->
           <!-- <vxe-column title="业务部门" align="center" field="departmentName" width="150px"/> -->
-          <!-- <vxe-column show-header-overflow show-overflow v-if="showColumn.status" title="需求单位" align="center" field="demandUnit"/> -->
-          <vxe-column show-header-overflow show-overflow v-if="showColumn.puManagerAuditor" title="采购经理审核人" align="center" field="puManagerAuditor" width="120px"/>
+          <!-- <vxe-column show-header-overflow show-overflow title="需求单位" align="center" field="demandUnit"/> -->
+          <vxe-column show-header-overflow show-overflow title="采购经理审核人" align="center" field="puManagerAuditor" width="120px"/>
           <vxe-column
           fixed="right"
           title="操作"

+ 22 - 22
src/views/purchase/purchase-order/column.js

@@ -1320,28 +1320,28 @@ export const SearchColumns = [
       dictName: "order_delivery_status",
     },
   },
-  // {
-  //   item: { 
-  //     key: "isUrgency", 
-  //     title: "紧急标识",
-  //   },
-  //   attr: { 
-  //     clearable: true,
-  //     is: "el-select", 
-  //     dictName: "sys_yes_no" 
-  //   },
-  // },
-  // {
-  //   item: { 
-  //     key: "isReplenishment", 
-  //     title: "补单标识",
-  //   },
-  //   attr: { 
-  //     clearable: true,
-  //     is: "el-select", 
-  //     dictName: "sys_yes_no" 
-  //   },
-  // },
+  {
+    item: { 
+      key: "isUrgency", 
+      title: "紧急标识",
+    },
+    attr: { 
+      clearable: true,
+      is: "el-select", 
+      dictName: "sys_yes_no" 
+    },
+  },
+  {
+    item: { 
+      key: "isReplenishment", 
+      title: "补单标识",
+    },
+    attr: { 
+      clearable: true,
+      is: "el-select", 
+      dictName: "sys_yes_no" 
+    },
+  },
   
   // {
   //   item:{

+ 22 - 22
src/views/purchase/task/columns.js

@@ -253,28 +253,28 @@ export default function useColumns() {
         valueKey: "name",
       },
     },
-    // {
-    //   item: { 
-    //     key: "isUrgency", 
-    //     title: "紧急标识",
-    //   },
-    //   attr: { 
-    //     clearable: true,
-    //     is: "el-select", 
-    //     dictName: "sys_yes_no" 
-    //   },
-    // },
-    // {
-    //   item: { 
-    //     key: "isReplenishment", 
-    //     title: "补单标识",
-    //   },
-    //   attr: { 
-    //     clearable: true,
-    //     is: "el-select", 
-    //     dictName: "sys_yes_no" 
-    //   },
-    // },
+    {
+      item: { 
+        key: "isUrgency", 
+        title: "紧急标识",
+      },
+      attr: { 
+        clearable: true,
+        is: "el-select", 
+        dictName: "sys_yes_no" 
+      },
+    },
+    {
+      item: { 
+        key: "isReplenishment", 
+        title: "补单标识",
+      },
+      attr: { 
+        clearable: true,
+        is: "el-select", 
+        dictName: "sys_yes_no" 
+      },
+    },
     {
       item: {
         key: "documentsCodes",

+ 2 - 2
src/views/purchase/task/index.vue

@@ -155,12 +155,12 @@ export default {
           @success="useQuery(params, page)"
         >
         </zp-button>
-        <!-- <lc-button
+        <lc-button
           :size="size"
           :select-data="selectData"
           @success="useQuery(params, page)"
         >
-        </lc-button> -->
+        </lc-button>
       </el-button-group>
       <!-- <el-button-group>
         <dc-button

+ 12 - 5
src/views/purchase/task/line-close/index.vue

@@ -27,16 +27,23 @@ export default {
      open(prop){
       console.log(prop);
 
-      this.$confirm('是否继续进行行关闭操作?', '提示', {
+      this.$prompt('请输入关闭原因', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
-          type: 'warning'
-        }).then(async() => {
+          inputPattern:  /\s*\S+?/,
+          inputErrorMessage: '关闭原因不能为空'
+        }).then( async({ value }) => {
 
           try {
-            let documentIds = this.selectData.map(item => item.id);
+
+            let params = {
+              documentIds: this.selectData.map(item => item.id),
+              baskCause: value,
+            }
+
+            console.log(params,'params');
             
-            let { code, msg } = await ROWClOSE(documentIds);
+            let { code, msg } = await ROWClOSE(params);
 
             if (code === 200) {
               this.$emit("success");

+ 8 - 0
src/views/purchase/task/xie-yi-zhi-cai/column.js

@@ -110,6 +110,14 @@ export const BasicColumns = [
     attr: {},
   },
   {
+    item: { key: "specification", title: "规格" },
+    attr: {},
+  },
+  {
+    item: { key: "model", title: "型号" },
+    attr: {},
+  },
+  {
     item: { key: "puOrgName", title: "采购组织" },
     attr: {},
   },

+ 136 - 10
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -57,11 +57,13 @@ export default {
       set(){},
     }
   },
-  watch: {},
+  watch: {
+  },
   methods: {
     //
     async open(prop) {
       this.visible = await this.fetchItem(prop);
+      this.supplier = '';
     },
     //
     hide() {
@@ -85,9 +87,8 @@ export default {
             })),
           }));
 
-          this.showData = _.cloneDeep(this.data);
-
           console.log(this.data,'this.data');
+          this.showData =  _.cloneDeep(this.data);
           return true;
         } else {
           return false;
@@ -111,7 +112,7 @@ export default {
         }))
         .filter((item) => item.orderPriceVos.length);
         console.log(params,'params');
-      try {
+        try {
         // try
         const { msg, code } = await ADD(params);
         if (code === 200) {
@@ -153,7 +154,39 @@ export default {
     },
     
     handleSelect(prop){
-      console.log(prop,'prop');
+      console.log(this.data,'handleSelect');
+
+      // this.tableColumns = this.tableColumns.map(({ item, attr }) =>{
+
+      //   if(item['key'] === 'supplierName'){
+      //     item.filter = [prop.value];
+      //   }
+
+      //   return {
+      //     item: {...item},
+      //     attr: {...attr},
+      //   }
+        
+      // })
+
+      // this.$refs.superTable.forEach(item =>{
+
+      //   let { onFilter, onFilters } = item;
+
+      //   let supplierFilter = {
+      //     item:{
+      //       key: 'supplierName',
+      //       title: '供应商',
+      //       filterabled:true,
+
+      //     },
+      //     attr: {}
+      //   }
+
+      //   onFilters(supplierFilter);
+      //   onFilter();
+      // })
+
       this.showData = this.data.map(item => {
         return {
           ...item,
@@ -162,13 +195,86 @@ export default {
       })
     },
     handleClear(){
-      this.showData = _.cloneDeep(this.data);
+      this.showData =  _.cloneDeep(this.data);
     },
     // 对象数组去重
     uniqueFunc(arr, uniId){
       const res = new Map();
       return arr.filter((item) => !res.has(item[uniId]) && res.set(item[uniId], 1));
     },
+    changeQuantity(prop,value){
+
+      this.data = this.data.map(item =>{
+
+        if(item.id === prop.id){
+
+          item.orderPriceVos = item.orderPriceVos.map(order =>{
+
+            if(order.id === value.id){
+
+              return value;
+            }
+
+            return order;
+          })
+
+          // item.orderPriceVos.forEach(order =>{
+
+          //   if(order.id === value.id){
+
+          //     let change = prop.orderPriceVos.filter(order => order.id === value.id);
+
+          //     order = {...change};
+
+          //   }
+
+          // })
+        }
+        return item;
+      })
+
+    },
+    changeDatePlan(prop,value){
+
+      this.data = this.data.map(item =>{
+
+        if(item.id === prop.id){
+
+          item.orderPriceVos = item.orderPriceVos.map(order =>{
+
+            if(order.id === value.id){
+
+              return value;
+            }
+
+            return order;
+          })
+
+        }
+        return item;
+      })
+    },
+    changeNote(prop,value){
+
+      this.data = this.data.map(item =>{
+
+        if(item.id === prop.id){
+
+          item.orderPriceVos = item.orderPriceVos.map(order =>{
+
+            if(order.id === value.id){
+
+              return value;
+            }
+
+            return order;
+          })
+
+        }
+        return item;
+      })
+    },
+
   },
   created() {},
   mounted() {},
@@ -210,7 +316,7 @@ export default {
         
       </template>
 
-      <!-- <el-row style="padding: 0 16px;">
+      <el-row style="padding: 0 16px;">
         <el-col>
           <el-autocomplete
             class="inline-input"
@@ -223,13 +329,13 @@ export default {
             @clear="handleClear"
           ></el-autocomplete>
         </el-col>
-      </el-row> -->
+      </el-row>
 
 
-      <div v-for="(item, index) in data" :key="index" class="m-4">
+      <div v-for="(item, index) in showData" :key="index" class="m-4">
 
         <template v-if="item.orderPriceVos.length">
-          <el-descriptions>
+          <el-descriptions :column="4">
             <template slot="title" >
               <template>
                 <span style="margin-right: 10px">{{ item.materialName }}</span>
@@ -255,6 +361,7 @@ export default {
           </el-descriptions>
   
           <el-super-table
+            ref="superTable"
             v-model="item.orderPriceVos"
             :columns="tableColumns"
             :size="$attrs.size"
@@ -267,6 +374,25 @@ export default {
                 v-model="scope.row[scope.item.key]"
                 :size="$attrs.size"
                 :max="scope.attr.max(scope.row)"
+                @change="changeQuantity(item,scope.row)"
+              >
+              </component>
+            </template>
+            <template slot="arrivalDatePlan" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                @change="changeDatePlan"
+              >
+              </component>
+            </template>
+            <template slot="note" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                @change="changeNote"
               >
               </component>
             </template>