浏览代码

Merge branch 'develop_cuxiao' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_cuxiao

chenrui 1 年之前
父节点
当前提交
00704f9197

+ 15 - 9
src/components/UploadFile/index.vue

@@ -143,16 +143,22 @@ export default {
       this.previewVisible = false
     },
     handlePreview (file) {
-      // if (this.listType == 'text') {
-      //   return
-      // }
-      // console.log(file)
-      if (file.response.status == 200) {
-        this.previewImage = file.response.data
-      } else {
-        this.previewImage = file.url || file.thumbUrl
+      console.log(file)
+      if (file.type && (file.type.indexOf('image') >= 0 || file.type.indexOf('video') >= 0)) {
+        if (file.response && file.response.status && file.response.status == 200) {
+          const src = file.response.data
+          this.previewImage = src && Array.isArray(src) ? src[0] && src[0].filePath : src
+        } else {
+          this.previewImage = file.url || file.thumbUrl
+        }
+        this.previewVisible = true
+      }else{
+        const src = file.response.data
+        if(!Array.isArray(src)){
+          this.previewImage = file.url || file.thumbUrl
+          this.previewVisible = true
+        }
       }
-      this.previewVisible = true
     },
     handleRemove (file) {
       this.$emit('remove')

+ 1 - 1
src/views/salesManagement/backorder/detailModal.vue

@@ -120,7 +120,7 @@ export default {
         { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('B_oosDetail_costPrice')) { //  成本
-        arr.push({ title: '缺货成本金额', dataIndex: 'showCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.push({ title: '缺货成本金额', dataIndex: 'totalShowCostAmount', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       if (this.$hasPermissions('B_oosDetail_salesPrice')) { //  售价权限
         arr.push({ title: '售价', dataIndex: 'price', width: '15%', align: 'right', scopedSlots: { customRender: 'price' }})

+ 2 - 1
src/views/salesManagement/backorder/list.vue

@@ -33,7 +33,8 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"

+ 2 - 1
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -218,7 +218,7 @@
             this.colspanNums = this.colspanNums + 3
             arr = arr.concat([
                 { title: '待下推数', field: 'unpushedQty', width: 80,key: "o", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
-                { title: '已下推数', field: 'pushedQty', width: 80,key: "p", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
+                { title: '已下推数', field: 'epushedQty', width: 80,key: "p", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
                 { title: '已取消数', field: 'cancelQty', width: 80,key: "q", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} }
             ])
           return arr
@@ -347,6 +347,7 @@
               item.productName = productName || '--'
               item.productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
               item.productOrigUnit = productOrigUnit || '--'
+              item.epushedQty = Number(item.pushedQty) - Number(item.pushQty)
               if (item.unpushedQty && (Number(item.stockQty) < Number(item.unpushedQty))) {
                   str += item.productCode + '、'
               }

+ 1 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -82,7 +82,7 @@
               <span v-if="$hasPermissions(authCode + '_salesPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
               <span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
-              <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ toThousands(detailData.totalDiscountAmount) }}</strong>;</span>
+              <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ Number(detailData.totalDiscountAmount).toFixed(2) }}</strong>;</span>
             </div>
           </div>
         </a-alert>

+ 7 - 3
src/views/salesManagement/salesQueryNew/edit.vue

@@ -83,7 +83,7 @@
           <div>
             产品总款数:<strong style="margin-right: 10px;"> {{ detailData.totalCategory }} </strong>
             总数量:<strong> {{ detailData.totalQty }} </strong>
-            <span style="margin:0 10px;" v-if="detailData.totalDiscountAmount">优惠金额:¥-<strong>{{ toThousands(detailData.totalDiscountAmount) }}</strong></span>
+            <span style="margin:0 10px;" v-if="detailData.totalDiscountAmount">优惠金额:¥-<strong>{{ Number(detailData.totalDiscountAmount).toFixed(2) }}</strong></span>
             <a-popover title="优惠明细" @visibleChange="(visible)=>{visible&&getPromYhDetail()}">
               <a-button shape="round" size="small" v-if="detailData.totalDiscountAmount">优惠明细</a-button>
               <div slot="content">
@@ -108,7 +108,7 @@
                     </div>
                     <div class="yhdetail" style="display: flex;justify-content: space-between;">
                       <span style="font-weight: bold;font-size:14px;">优惠金额:</span>
-                      <span style="font-weight: bold;font-size:18px;">¥{{ toThousands(yhDetail.totalLossAmount) }}</span>
+                      <span style="font-weight: bold;font-size:18px;">¥{{ Number(yhDetail.totalLossAmount).toFixed(2) }}</span>
                     </div>
                 </div>
                 <div style="text-align: center;padding: 20px;" v-else>
@@ -443,6 +443,7 @@ export default {
     // 启用规则
     enabledActive(e,item){
       const _this = this
+      this.spinning = true
       salesEnablePromoPromo({
         salesBillSn: _this.salesBillSn,
         salesPromoSn: item.salesPromoSn
@@ -452,6 +453,7 @@ export default {
           item.disabled = false
           item.isActive = true
           _this.activeList.splice()
+          _this.spinning = false
           // 刷新正常活动
           _this.$refs.productNormalList.resetSearchForm()
           _this.insterActiveOk('normal')
@@ -462,6 +464,7 @@ export default {
     // 禁用规则
     disabledActive(e,item){
       const _this = this
+      _this.spinning = true
       salesDisablePromo({
         salesBillSn: _this.salesBillSn,
         salesPromoSn: item.salesPromoSn,
@@ -473,7 +476,7 @@ export default {
           // 刷新所有表格
           _this.$refs.productNormalList.resetSearchForm()
           _this.insterActiveOk('normal')
-          
+          _this.spinning = false
           _this.disabledActiveOption = null
           item.disabled = true
           item.isActive = false
@@ -486,6 +489,7 @@ export default {
     disenablePromp(e,item){
       const _this = this
       const table = _this.$refs['productList-'+item.promoRuleSn][0]
+
       // 是否启用规则
       if(item.disabled){
         this.enabledActive(e,item)

+ 2 - 1
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -327,7 +327,7 @@ export default {
           { title: '可用库存', field: 'stockQty', width: 80,key: "j", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
           { title: '销售数量', field: 'qty', width: 80,key: "k", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
           { title: '已取消', field: 'cancelQty', width: 80,key: "o", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
-          { title: '已下推', field: 'pushedQty', width: 80,key: "p", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
+          { title: '已下推', field: 'epushedQty', width: 80,key: "p", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
           { title: '待下推', field: 'surplusQty', width: 80,key: "q", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
           { title: '取消数量', field: 'surplusQty', width: 80,key: "r", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return inputFormat(row,row[column.field],h)} },
           { title: '操作', field: 'action', width: 80,key: "s", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return actionFormat(row,row[column.field],h)} },
@@ -466,6 +466,7 @@ export default {
           item.productName = productName || '--'
           item.productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
           item.productOrigUnit = productOrigUnit || '--'
+          item.epushedQty = Number(item.pushedQty) - Number(item.pushQty)
           item.cancelNums = item.surplusQty
           // 库存为0或待下推数为0,不可添加
           if(!item.surplusQty || item.surplusQty<0){

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.111/ocs-admin',
+        // target: 'http://192.168.2.111/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {