Selaa lähdekoodia

采购需求处理bug处理

黄梓星 1 vuosi sitten
vanhempi
commit
8b93ae83cf

+ 1 - 1
src/api/purchase/DemandSummary.js

@@ -95,7 +95,7 @@ export function exportList(data) {
 // 采购需求汇总明细导出
 export function exportItems(data) {
   return request({
-    url: `/pu/demand/item/exports`,
+    url: `/pu/demand/item/exports?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
     method: 'post',
     data: data,
     responseType: 'blob'

+ 10 - 2
src/views/purchase/DemandSummary/add.vue

@@ -42,13 +42,21 @@
         <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="120"/>
-        <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 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="customerName" width="150"/>
         <el-table-column show-overflow-tooltip label="最小订货量" align="center" prop="minOrderQty" 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"/>
         <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="updateCause" width="150">
+          <template slot-scope="scope">
+            <el-input 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"/>

+ 36 - 7
src/views/purchase/DemandSummary/index.vue

@@ -261,12 +261,36 @@
           <el-table-column show-overflow-tooltip v-if="showColumn.unit" label="单位" align="center" prop="unit"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.manufacturer" label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.demandNum" label="需求单位数" align="center" prop="demandNum" width="80px"/>
-          <el-table-column show-overflow-tooltip v-if="showColumn.evensalesforyear" label="近1月月均需求" align="center" prop="evensalesforyear" width="80px"/>
-          <el-table-column show-overflow-tooltip v-if="showColumn.evensalesforthrmonth" label="近3月月均需求" align="center" prop="evensalesforthrmonth" width="80px"/>
-          <el-table-column show-overflow-tooltip v-if="showColumn.netDemandNum" label="总最终净需求量" align="center" prop="netDemandNum" width="80px"/>
-          <el-table-column show-overflow-tooltip v-if="showColumn.totalMonthlySales" label="总月销量" align="center" prop="totalMonthlySales" width="80px" />
-          <el-table-column show-overflow-tooltip v-if="showColumn.demandCycle" label="需求可用周期" align="center" prop="demandCycle" width="80px"/>
-          <el-table-column show-overflow-tooltip v-if="showColumn.dullQut" label="呆滞量" align="center" prop="dullQut" width="80px" />
+          <el-table-column show-overflow-tooltip v-if="showColumn.evensalesforyear" label="近1月月均需求" align="center" prop="evensalesforyear" width="80px">
+            <template slot-scope="scope">
+              {{scope.row.evensalesforyear ? parseFloat(scope.row.evensalesforyear).toFixed(2) : '0.00'}}
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip v-if="showColumn.evensalesforthrmonth" label="近3月月均需求" align="center" prop="evensalesforthrmonth" width="80px">
+            <template slot-scope="scope">
+              {{scope.row.evensalesforthrmonth ? parseFloat(scope.row.evensalesforthrmonth).toFixed(2) : '0.00'}}
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip v-if="showColumn.netDemandNum" label="总最终净需求量" align="center" prop="netDemandNum" width="80px">
+            <template slot-scope="scope">
+              {{scope.row.netDemandNum ? parseFloat(scope.row.netDemandNum).toFixed(2) : '0.00'}}
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip v-if="showColumn.totalMonthlySales" label="总月销量" align="center" prop="totalMonthlySales" width="80px">
+            <template slot-scope="scope">
+              {{scope.row.totalMonthlySales ? parseFloat(scope.row.totalMonthlySales).toFixed(2) : '0.00'}}
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip v-if="showColumn.demandCycle" label="需求可用周期" align="center" prop="demandCycle" width="80px">
+            <template slot-scope="scope">
+              {{scope.row.demandCycle ? parseFloat(scope.row.demandCycle).toFixed(1) : '0.0'}}
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip v-if="showColumn.dullQut" label="呆滞量" align="center" prop="dullQut" width="80px">
+            <template slot-scope="scope">
+              {{parseFloat(scope.row.dullQut).toFixed(2)}}
+            </template>
+          </el-table-column>
           <el-table-column show-overflow-tooltip v-if="showColumn.buyPeriod" label="采购周期" align="center" prop="buyPeriod" width="80px" />
           <el-table-column show-overflow-tooltip v-if="showColumn.centralPublicStock" label="中心公共库存" align="center" prop="centralPublicStock" width="80px"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.centralWarehouse" label="中心仓专属货位" align="center" prop="centralWarehouse" width="80px"/>
@@ -317,7 +341,11 @@
           <el-table-column show-overflow-tooltip v-if="showColumn.validityPeriod" label="有效期" align="center" prop="validityPeriod"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.validityPeriodUnit" label="有效期单位" align="center" prop="validityPeriodUnit" width="80px"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.businessType" label="业务类型" align="center" prop="businessType" :formatter="formatterBusinessType"/>
-          <el-table-column show-overflow-tooltip v-if="showColumn.safetyStock" label="安全库存量" align="center" prop="safetyStock" width="80px"/>
+          <el-table-column show-overflow-tooltip v-if="showColumn.safetyStock" label="安全库存量" align="center" prop="safetyStock" width="80px">
+            <template slot-scope="scope">
+              {{scope.row.safetyStock ? parseFloat(scope.row.safetyStock).toFixed(2) : '0.00'}}
+            </template>
+          </el-table-column>
           <el-table-column show-overflow-tooltip v-if="showColumn.billSource" label="单据来源" align="center" prop="billSource" :formatter="formatterSource"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.registrant" label="注册人" align="center" prop="registrant" width="120px"/>
           <!-- <el-table-column label="可用量" align="center" prop="qty"/> -->
@@ -614,6 +642,7 @@ export default {
     handleCommand() {
       this.$modal.loading("正在导出数据,请稍后...");
       let param = this.queryParams
+      param.pageSize = this.total
       exportItems(param).then(res => {
         this.$modal.closeLoading();
         const blob = new Blob([res], {

+ 3 - 2
src/views/purchase/PurchaseDemandList/index.vue

@@ -665,8 +665,9 @@ export default {
     },
     // 流程收回
     reback(row) {
-      rebacktWork().then(res => {
-
+      let params = {billCode: row.code, fdId: row.flowId, fdTemplateId: '18804432233a7813df7921d436ab69b7' }
+      rebacktWork(params).then(res => {
+        
       })
     },
     // 行内删除