Ver código fonte

Merge branch 'develop'

FengChaoYu 3 meses atrás
pai
commit
42fe48a00e

+ 11 - 11
src/views/mallManagement/goods/goods_add/index.vue

@@ -1105,7 +1105,7 @@ export default {
       const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1)
       const whiteList = ['jpg', 'jpeg', 'png']
       if (whiteList.indexOf(fileSuffix) === -1) {
-        this.$('请添加规格类型')('只支持上传jpg/png文件!')
+        this.$errorMsg('只支持上传jpg/png文件!')
         return false
       }
     },
@@ -1128,7 +1128,7 @@ export default {
       const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1)
       const whiteList = ['AVI', 'mov', 'rmvb', 'rm', 'FLV', 'mp4']
       if (whiteList.indexOf(fileSuffix) === -1) {
-        this.$('请添加规格类型')('只支持上传视频文件!')
+        this.$errorMsg('只支持上传视频文件!')
         return false
       }
     },
@@ -1143,7 +1143,7 @@ export default {
       const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1)
       const whiteList = ['jpg', 'jpeg', 'png']
       if (whiteList.indexOf(fileSuffix) === -1) {
-        this.$('请添加规格类型')('只支持上传jpg/png文件!')
+        this.$errorMsg('只支持上传jpg/png文件!')
         return false
       }
     },
@@ -1158,7 +1158,7 @@ export default {
       const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1)
       const whiteList = ['jpg', 'jpeg', 'png']
       if (whiteList.indexOf(fileSuffix) === -1) {
-        this.$('请添加规格类型')('只支持上传jpg/png文件!')
+        this.$errorMsg('只支持上传jpg/png文件!')
         return false
       }
     },
@@ -1201,13 +1201,13 @@ export default {
     // 富文本图片 - 上传失败
     uploadError4() {
       this.quillImgLoading = false
-      this.$('请添加规格类型')('图片插入失败')
+      this.$errorMsg('图片插入失败')
     },
 
     // 轮播图 - 点击上传图片
     uploadImage(id) {
       if (this.step1Form.images.length >= 6) {
-        this.$('请添加规格类型')('最多上传6张轮播图')
+        this.$errorMsg('最多上传6张轮播图')
         return
       }
 
@@ -1228,7 +1228,7 @@ export default {
         this.$set(this.step1Form.images, index, res.data)
       } else {
         if (this.step1Form.images.length >= 6) {
-          return this.$('请添加规格类型')('最多上传6张轮播图')
+          return this.$errorMsg('最多上传6张轮播图')
         }
         this.step1Form.images.push(res.data)
       }
@@ -1236,7 +1236,7 @@ export default {
 
     // 轮播图 - 超出限制数量
     uploadExceed2(files, fileList) {
-      return this.$('请添加规格类型')('最多上传6张轮播图')
+      return this.$errorMsg('最多上传6张轮播图')
     },
 
     // 轮播图 - 上传前
@@ -1244,7 +1244,7 @@ export default {
       const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1)
       const whiteList = ['jpg', 'jpeg', 'png']
       if (whiteList.indexOf(fileSuffix) === -1) {
-        this.$('请添加规格类型')('只支持上传jpg/jpeg/png文件!')
+        this.$errorMsg('只支持上传jpg/jpeg/png文件!')
         return false
       }
     },
@@ -1268,7 +1268,7 @@ export default {
         this.$set(this.step1Form.images, index, targetItem)
         this.$set(this.step1Form.images, index - 1, thisItem)
       } else {
-        this.$('请添加规格类型')('已经最前,无法前移')
+        this.$errorMsg('已经最前,无法前移')
       }
     },
 
@@ -1281,7 +1281,7 @@ export default {
         this.$set(this.step1Form.images, index, targetItem)
         this.$set(this.step1Form.images, index + 1, thisItem)
       } else {
-        this.$('请添加规格类型')('已经最后,无法后移')
+        this.$errorMsg('已经最后,无法后移')
       }
     },
 

+ 17 - 2
src/views/mallManagement/order/offline_order_list/index.vue

@@ -28,7 +28,7 @@
           <div style="font-weight: 500">客户信息</div>
           <el-divider></el-divider>
 
-          <el-row :gutter="20">
+          <el-row :gutter="20" class="formRow">
             <el-col :span="6">
               <el-form-item label="业务员" prop="saleName">
                 <el-input v-model="formData.saleName" autocomplete="off" placeholder="请输入业务员"></el-input>
@@ -340,6 +340,11 @@
                 {{ scope.row.partsNum }}
               </template>
             </el-table-column>
+            <el-table-column align="center" label="采购价格" prop="costPrice" min-width="120">
+              <template slot-scope="scope">
+                <el-input size="small" type="number" v-model="scope.row.costPrice"></el-input>
+              </template>
+            </el-table-column>
             <el-table-column align="center" label="单价" prop="price" min-width="120">
               <template slot-scope="scope">
                 <el-input size="small" type="number" v-model="scope.row.price"></el-input>
@@ -634,6 +639,7 @@
             <el-table-column align="center" label="内机数量" prop="insideNum" min-width="120"></el-table-column>
             <el-table-column align="center" label="外机数量" prop="outNum" min-width="120"></el-table-column>
             <el-table-column align="center" label="配件数量" prop="partNum" min-width="120"></el-table-column>
+            <el-table-column align="center" label="采购价格" prop="costPrice" min-width="120"></el-table-column>
             <el-table-column align="center" label="单价" prop="price" min-width="120"></el-table-column>
             <el-table-column align="center" label="金额" min-width="120">
               <template slot-scope="scope">
@@ -1080,6 +1086,7 @@ export default {
             }
             if (!this.goodsList[i].num) return this.$errorMsg('请完善商品信息-订单数量')
             if (!this.goodsList[i].price) return this.$errorMsg('请完善商品信息-单价')
+            if (!this.goodsList[i].costPrice) return this.$errorMsg('请完善商品信息-采购价格')
           }
 
           let orderSmallTypeText = this.orderTypeList.find(o => o.id == this.formData.orderSmallType).orderSmallTypeText
@@ -1394,6 +1401,7 @@ export default {
         insideNum: '', // 内机数量
         outNum: '', // 外机数量
         partsNum: '', // 配件数量
+        costPrice: '', // 采购价格
         price: '', // 单价
         amount: '', // 金额
         stockQty: '' // 当前库存
@@ -1431,6 +1439,7 @@ export default {
         this.goodsList[index].outNum = ''
         this.goodsList[index].partsNum = ''
         this.goodsList[index].stockQty = ''
+        this.goodsList[index].costPrice = ''
         this.$message.error('该规格型号已存在')
         return
       } else {
@@ -1449,6 +1458,7 @@ export default {
         this.goodsList[index].outNum = item.outQty
         this.goodsList[index].partsNum = item.partsQty
         this.goodsList[index].stockQty = item.stockQty
+        this.goodsList[index].costPrice = item.costAmount
       }
     },
 
@@ -1477,13 +1487,13 @@ export default {
     changeGoodSpec(index, row) {
       let list = this.goodsSelectList.find(o => o.goodsId == row.goodsId).goodsSpecs
       let item = list.find(o => o.goodsSpecId == row.goodsSpecId)
-
       this.goodsList[index].mainId = item.mainId
       this.goodsList[index].mainName = item.mainName
       this.goodsList[index].smallId = item.smallId
       this.goodsList[index].smallName = item.smallName
       this.goodsList[index].unit = item.unit
       this.goodsList[index].stockQty = item.goodsMaterialStock
+      this.goodsList[index].costPrice = item.costAmount
     },
 
     creatCode(data, orderId) {
@@ -1642,6 +1652,11 @@ export default {
     margin-top: 20px;
   }
 }
+
+.formRow ::v-deep .el-radio-group {
+  height: 40px;
+  line-height: 40px;
+}
 </style>
 
 <style lang="scss">

+ 16 - 0
src/views/mallManagement/order/order_detail/index.vue

@@ -258,6 +258,7 @@
         <el-table-column prop="goodsSpecValue" label="规格" align="center">
           <template slot-scope="scope"> {{ scope.row.goodsSpecName }}{{ scope.row.goodsSpecValue }} </template>
         </el-table-column>
+        <el-table-column prop="costPrice" label="采购价格" align="center"></el-table-column>
         <el-table-column prop="price" label="单价" align="center"></el-table-column>
         <el-table-column prop="num" label="数量" align="center"></el-table-column>
         <el-table-column prop="sendStockNum" label="已发货数量" min-width="100" align="center"></el-table-column>
@@ -427,6 +428,7 @@
             }}</span
           >
           <span style="margin-right: 30px; font-size: 18px">已收款金额:{{ orderDetail.paidAmount }}</span>
+          <span style="margin-right: 30px; font-size: 18px">已其他收款金额:{{ totalOtherAmount }}</span>
         </div>
         <el-table
           v-if="orderPaymentRecordListData.length"
@@ -444,6 +446,7 @@
           <el-table-column prop="paidBy" label="收款人" align="center"></el-table-column>
           <el-table-column prop="paidTime" label="收款时间" align="center"></el-table-column>
           <el-table-column prop="paidAmount" label="收款金额" align="center"></el-table-column>
+          <el-table-column prop="otherAmount" label="其他收款金额" align="center"></el-table-column>
           <el-table-column prop="fileUrl" label="收款凭证" align="center">
             <template slot-scope="scope">
               <div>
@@ -493,6 +496,11 @@
                   </el-date-picker>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="其他收款金额" prop="otherAmount">
+                  <el-input style="width: 100%" type="number" v-model="ruleForm.otherAmount"></el-input>
+                </el-form-item>
+              </el-col>
               <el-col :span="24">
                 <el-form-item label="凭证">
                   <ImageUpload :fileList="ruleForm.fileUrls" :limit="100" :isEdit="true" />
@@ -1198,10 +1206,12 @@ export default {
       storageName: '',
       pageType: '',
       orderPaymentRecordListData: [],
+      totalOtherAmount: 0,
       ruleForm: {
         paidAmount: '',
         paidBy: '',
         paidTime: '',
+        otherAmount: '',
         fileUrls: []
       },
       rules: {
@@ -1278,6 +1288,7 @@ export default {
               paidAmount: '',
               paidBy: '',
               paidTime: '',
+              otherAmount: '',
               fileUrls: []
             }
             this.$successMsg('记录成功')
@@ -1289,6 +1300,11 @@ export default {
     getDetail() {
       orderPaymentRecordList({ orderId: this.orderId }).then(res => {
         this.orderPaymentRecordListData = res.data
+        if (this.orderPaymentRecordListData.length > 0) {
+          this.totalOtherAmount = this.orderPaymentRecordListData.reduce((total, item) => {
+            return total + item.otherAmount
+          }, 0)
+        }
       })
       getOrderDetail({ orderId: this.orderId, storageId: this.orderForm.storageId }).then(res => {
         this.orderDetail = res.data