chenrui 4 vuotta sitten
vanhempi
commit
083184d09b

+ 9 - 12
src/views/financialManagement/warehousingAudit/detail.vue

@@ -16,18 +16,18 @@
     <a-card size="small" :bordered="false" class="warehousingAuditDetail-cont">
       <a-collapse :activeKey="['1']">
         <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
+          <a-descriptions :column="3" v-if="basicInfoData">
             <a-descriptions-item label="供应商">{{ basicInfoData&&basicInfoData.dealerName ? basicInfoData.dealerName : '--' }}</a-descriptions-item>
             <a-descriptions-item label="入库时间">{{ basicInfoData&&basicInfoData.stockPutTime ? basicInfoData.stockPutTime : '--' }}</a-descriptions-item>
             <a-descriptions-item label="采购单号">{{ basicInfoData&&basicInfoData.purchaseBillNo ? basicInfoData.purchaseBillNo : '--' }}</a-descriptions-item>
           </a-descriptions>
-          <a-descriptions :column="3" bordered>
-            <a-descriptions-item label="采购总款数">{{ (basicInfoData&&basicInfoData.totalCategory!=0) ? basicInfoData.totalCategory : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="采购总数量">{{ (basicInfoData&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="采购总成本">¥{{ (basicInfoData&&basicInfoData.totalAmount!=0) ? basicInfoData.totalAmount : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="入库总款数">{{ (basicInfoData&&basicInfoData.totalPutCategory!=0) ? basicInfoData.totalPutCategory : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="入库总数量">{{ (basicInfoData&&basicInfoData.totalPutQty!=0) ? basicInfoData.totalPutQty : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="入库总成本">¥{{ (basicInfoData&&basicInfoData.totalPutAmount!=0) ? basicInfoData.totalPutAmount : 0 }}</a-descriptions-item>
+          <a-descriptions :column="3" bordered v-if="basicInfoData">
+            <a-descriptions-item label="采购总款数">{{ (basicInfoData.totalCategory&&basicInfoData.totalCategory!=0) ? basicInfoData.totalCategory : 0 }}</a-descriptions-item>
+            <a-descriptions-item label="采购总数量">{{ (basicInfoData.totalQty&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
+            <a-descriptions-item label="采购总成本">¥{{ (basicInfoData.totalAmount&&basicInfoData.totalAmount!=0) ? basicInfoData.totalAmount : 0 }}</a-descriptions-item>
+            <a-descriptions-item label="入库总款数">{{ (basicInfoData.totalPutCategory&&basicInfoData.totalPutCategory!=0) ? basicInfoData.totalPutCategory : 0 }}</a-descriptions-item>
+            <a-descriptions-item label="入库总数量">{{ (basicInfoData.totalPutQty&&basicInfoData.totalPutQty!=0) ? basicInfoData.totalPutQty : 0 }}</a-descriptions-item>
+            <a-descriptions-item label="入库总成本">¥{{ (basicInfoData.totalPutAmount&&basicInfoData.totalPutAmount!=0) ? basicInfoData.totalPutAmount : 0 }}</a-descriptions-item>
           </a-descriptions>
         </a-collapse-panel>
       </a-collapse>
@@ -54,7 +54,6 @@
 </template>
 
 <script>
-import { getOperationalPrecision } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
 import { receivingDetailList, receivingDetailSn } from '@/api/receiving'
 export default {
@@ -69,7 +68,7 @@ export default {
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 220, align: 'center' },
         { title: '采购数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库数量', dataIndex: 'putQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center' },
         { title: '入库小计', dataIndex: 'totalAmount', width: 100, align: 'center' },
         { title: '仓库', dataIndex: 'warehouseEntity.name', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -83,8 +82,6 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
-            // 入库小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-            data.list[i].warehousingSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
           }
           this.disabled = false
           return data

+ 1 - 1
src/views/financialManagement/warehousingAudit/list.vue

@@ -117,7 +117,7 @@ export default {
         { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购入库单号', scopedSlots: { customRender: 'receivingBillNo' }, width: 220, align: 'center' },
         { title: '总款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库总数量', dataIndex: 'totalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库总数量', dataIndex: 'totalPutQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库总成本', dataIndex: 'totalPutAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '签收入库时间', dataIndex: 'stockPutTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务入库审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },

+ 7 - 5
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -55,7 +55,7 @@
                 v-model="record.returnQty"
                 :precision="0"
                 :min="1"
-                :max="record.qtyLeft"
+                :max="record.refundableQty"
                 placeholder="请输入"
                 style="width: 100%;" />
             </template>
@@ -100,7 +100,7 @@
                 v-model="record.qty"
                 :precision="0"
                 :min="1"
-                :max="record.qtyLeft"
+                :max="record.refundableQty"
                 placeholder="请输入"
                 @blur="e => qtyBlur(e.target.value, record)"
                 style="width: 100%;" />
@@ -158,7 +158,7 @@ export default {
         { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center' },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true },
         { title: '采购总数', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '可退数量', dataIndex: 'qtyLeft', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '可退数量', dataIndex: 'refundableQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: 100, align: 'center' },
         { title: '采购价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
@@ -227,8 +227,10 @@ export default {
         qty: isEdit ? row.qty : row.returnQty, //  退货数量
         productSn: row.productSn,
         cost: row.price,
-        remarks: row.remarks
+        remarks: row.remarks,
+        promotionFlag: row.promotionFlag
       }
+      console.log(params)
       if (isEdit) { // 编辑
         // 清空退货数量时,值应保持未清空前的值,因退货数量都不可为空
         if (!row.qty) {
@@ -364,7 +366,7 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].qtyBackups = data.list[i].qty
             data.list[i].remarksBackups = data.list[i].remarks
-            data.list[i].qtyLeft = data.list[i].purchaseBillQtyLeft + data.list[i].qty
+            data.list[i].refundableQty = data.list[i].purchaseBillRefundableQty + data.list[i].qty
           }
           this.chooseLoadData = data.list
         } else {