chenrui 2 лет назад
Родитель
Сommit
691a878a17

+ 11 - 5
src/views/salesManagement/salesQuery/edit.vue

@@ -222,7 +222,7 @@
     <!-- 仓库设置 -->
     <setWarehouse :show="openWarehouseModal" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
     <!-- 价格更新弹窗 -->
-    <setPriceModal :show="priceUpdateModal" @ok="updatePrice" @cancel="priceUpdateModal=false"></setPriceModal>
+    <setPriceModal :show="priceUpdateModal" :totalRealAmount="updataData.totalRealAmount" :totalAmount="updataData.totalAmount" @ok="updatePrice" @cancel="priceUpdateModal=false"></setPriceModal>
   </div>
 </template>
 
@@ -289,7 +289,10 @@ export default {
       },
       rowSelectionInfo: null,
       priceUpdateModal: false, // 价格更新弹窗
-      updataData: undefined
+      updataData: {
+        totalRealAmount: '',
+        totalAmount: ''
+      }
     }
   },
   computed: {
@@ -593,9 +596,12 @@ export default {
       if (this.detailData && this.detailData.salesBillSource && this.detailData.salesBillSource == 'PURCHASE') {
         submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
           if (res.status == 200) {
-            if (res.data.length > 0) {
+            if (res.data.detailList.length > 0) {
               this.updataData = res.data
-              this.priceUpdateModal = true
+              const _this = this
+              this.$nextTick(() => {
+                _this.priceUpdateModal = true
+              })
             } else {
               const ajax_data = { salesBillSn: this.salesBillSn }
               this.submitResult(ajax_data)
@@ -630,7 +636,7 @@ export default {
         }
         _this.submitResult(ajax_data)
       } else {
-        updateBatch(_this.updataData).then(res => {
+        updateBatch(_this.updataData.detailList).then(res => {
           if (res.status == 200) {
             const ajax_data = {
               salesBillSn: _this.salesBillSn,

+ 1 - 1
src/views/salesManagement/salesQuery/queryPart.vue

@@ -166,9 +166,9 @@ export default {
       const arr = [
         { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, width: '18%', align: 'left' },
-        { title: '出库仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 12 - 4
src/views/salesManagement/salesQuery/setPriceModal.vue

@@ -5,7 +5,7 @@
     centered
     :maskClosable="false"
     :confirmLoading="confirmLoading"
-    width="25%"
+    width="30%"
     :footer="null"
     @cancel="cancel"
   >
@@ -16,10 +16,10 @@
           <div style="margin-bottom:10px;font-weight:bold;">销售单部分产品价格发生变更,请确认</div>
           <a-radio-group v-model="priceVal">
             <a-radio value="0" :style="radioStyle">
-              以订单当前价格为准,总金额:100
+              以订单当前价格为准,总金额:{{ totalRealAmount }}
             </a-radio>
             <a-radio value="1" :style="radioStyle">
-              以OCS最新价格为准,总金额:100
+              以OCS最新价格为准,总金额:{{ totalAmount }}
             </a-radio>
           </a-radio-group>
         </div>
@@ -38,7 +38,15 @@ export default {
   name: 'SetPriceModal',
   mixins: [commonMixin],
   props: {
-    show: [Boolean]
+    show: [Boolean],
+    totalRealAmount: {
+      type: String,
+      default: ''
+    },
+    totalAmount: {
+      type: String,
+      default: ''
+    }
   },
   data () {
     return {

+ 2 - 1
src/views/salesManagement/waitDispatch/edit.vue

@@ -136,6 +136,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '26%', align: 'center' },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '29%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '待下推数量', dataIndex: 'surplusQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次下推数', scopedSlots: { customRender: 'salesNums' }, width: '11%', align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -357,7 +358,7 @@ export default {
       this.isInster = true
       this.loading = true
       this.spinning = true
-      const params = Object.assign({ dispatchBillSn: this.$route.params.dispatchBillSn }, data)
+      const params = Object.assign({ dispatchBillSn: this.productForm.dispatchBillSn }, data)
       pushDown(params).then(res => {
         if (res.status == 200) {
           this.handleBack()

+ 1 - 1
src/views/salesManagement/waitDispatch/queryPart.vue

@@ -214,7 +214,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '销售价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '出库仓库', dataIndex: 'warehouseName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'dispatchBill.warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '可用库存', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },