lilei 4 yıl önce
ebeveyn
işleme
eba1c84f39

+ 4 - 0
src/components/Table/index.js

@@ -19,6 +19,10 @@ export default {
       type: [String, Function],
       default: 'key'
     },
+    rowClassName: {
+      type: [String, Function],
+      default: ''
+    },
     data: {
       type: Function,
       required: true

+ 4 - 4
src/views/customerManagement/customerInfo/edit.vue

@@ -32,7 +32,7 @@
               <a-input id="customerManagementEdit-contactTel" :maxLength="11" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多11个字符)" allowClear />
             </a-form-model-item>
           </a-col>
-          <a-col :span="8" v-if="model=='page'">
+          <a-col :span="8">
             <a-form-model-item label="联系人" prop="contactName">
               <a-input id="customerManagementEdit-contactName" :maxLength="30" v-model.trim="form.contactName" placeholder="请输入联系人(最多30个字符)" allowClear />
             </a-form-model-item>
@@ -68,12 +68,12 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="8">
-            <a-form-model-item label="详细地址" prop="customerAddr">
+            <a-form-model-item label="" prop="customerAddr">
               <a-input id="customerManagementEdit-customerAddr" :maxLength="60" v-model.trim="form.customerAddr" placeholder="请输入详细地址(最多60个字符)" allowClear />
             </a-form-model-item>
           </a-col>
         </a-row>
-        <a-row :gutter="15" v-if="model=='page'">
+        <a-row :gutter="15">
           <a-col :span="8">
             <a-form-model-item label="客户传真" prop="fax">
               <a-input id="customerManagementEdit-fax" :maxLength="30" v-model.trim="form.fax" placeholder="请输入客户传真(最多30个字符)" allowClear />
@@ -109,7 +109,7 @@
               </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :span="8" v-if="model=='page'">
+          <a-col :span="8">
             <a-form-model-item label="客户类型" prop="customerTypeSn">
               <a-select id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型">
                 <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>

+ 2 - 2
src/views/financialManagement/financialCollection/list.vue

@@ -295,8 +295,8 @@ export default {
       this.loading = true
       settleReceiptMoney({ id: row.id }).then(res => {
         this.loading = false
-        this.$message.success(res.message)
         if (res.status == 200) {
+          this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
         }
@@ -313,8 +313,8 @@ export default {
       this.loading = true
       settleReceiptMoney({ settleChangeIds: this.selectedRowKeys }).then(res => {
         this.loading = false
-        this.$message.success(res.message)
         if (res.status == 200) {
+          this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
         }

+ 2 - 2
src/views/financialManagement/financialPayment/list.vue

@@ -295,8 +295,8 @@ export default {
       this.loading = true
       settlePayMoney({ id: row.id }).then(res => {
         this.loading = false
-        this.$message.success(res.message)
         if (res.status == 200) {
+          this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
         }
@@ -313,8 +313,8 @@ export default {
       this.loading = true
       settlePayMoney({ settleChangeIds: this.selectedRowKeys }).then(res => {
         this.loading = false
-        this.$message.success(res.message)
         if (res.status == 200) {
+          this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
         }

+ 3 - 5
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -93,9 +93,9 @@
           <a-form-model-item label="联系电话" prop="consigneeTel">
             <a-input
               id="chooseCustom-consigneeTel"
-              :maxLength="30"
+              :maxLength="11"
               v-model="form.consigneeTel"
-              placeholder="请输入联系电话(最多30个字符)"
+              placeholder="请输入联系电话(最多11个字符)"
               allowClear />
           </a-form-model-item>
         </a-col>
@@ -242,9 +242,7 @@ export default {
         buyerSn: [
           { required: true, message: '请选择客户', trigger: ['change', 'blur'] }
         ],
-        consigneeTel: [
-          { required: true, message: '请输入联系电话', trigger: 'blur' }
-        ],
+        consigneeTel: [{ required: true, message: '请输入联系电话', trigger: 'blur' }, { pattern: /^\d{11}$/, message: '请输入正确的手机号' }],
         shippingAddressProvinceSn: [
           { required: true, message: '请选择省', trigger: 'change' }
         ],

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

@@ -63,7 +63,7 @@
         class="button-info"
         size="large"
         style="width: 150px;"
-        v-if="detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_STOCK'"
+        v-if="detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_WAREHOUSE'"
         @click="handleEdit()"
         id="salesDetail-edit-btn">编辑</a-button>
     </a-card>

+ 4 - 0
src/views/salesManagement/salesQuery/edit.vue

@@ -78,6 +78,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1560, y: 300 }"
+        :rowClassName="(record, index) => record.cost > record.price ? 'redBg-row':''"
         bordered>
         <!-- 产品编码 -->
         <template slot="productCode" slot-scope="text, record">
@@ -416,6 +417,9 @@ export default {
         }
       }
     }
+    .redBg-row{
+      background-color: #f5cdc8;
+    }
   }
 
 </style>

+ 8 - 2
src/views/salesManagement/salesQuery/queryPart.vue

@@ -245,12 +245,17 @@ export default {
         this.disabled = true
         this.queryParam.salePriceType = this.priceType
         // 排序
-        parameter.sortAlias = 'sd'
+        if (parameter.sortField == 'productCode') {
+          parameter.sortField = 'code'
+          parameter.sortAlias = 'product '
+        }
         if (parameter.sortField == 'brandName') {
-          parameter.sortField = 'brandSn'
+          parameter.sortField = 'productBrandSn'
+          parameter.sortAlias = 'product'
         }
         if (parameter.sortField == 'warehouseName') {
           parameter.sortField = 'warehouseSn'
+          parameter.sortAlias = 'sd'
         }
         return querySumByProductLocation(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
@@ -319,6 +324,7 @@ export default {
     },
     //  重置
     resetSearchForm () {
+      this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.queryParam.productOrigCode = ''
       this.queryParam.brandSn = undefined