chenrui 3 سال پیش
والد
کامیت
8d22bd4a36
2فایلهای تغییر یافته به همراه21 افزوده شده و 17 حذف شده
  1. 20 16
      src/views/allocationManagement/transferOut/edit.vue
  2. 1 1
      src/views/allocationManagement/transferOut/list.vue

+ 20 - 16
src/views/allocationManagement/transferOut/edit.vue

@@ -114,21 +114,25 @@
               :scroll="{ x: 1160, y: 300 }"
               bordered>
               <!-- 售价 -->
-              <template slot="price" slot-scope="text, record, index">{{ record.provincePrice }}
-                <a-select
-                  size="small"
-                  id="allocateBillEdit-price"
-                  option-label-prop="label"
-                  v-model="record.price"
-                  placeholder="请选择"
-                  @change="e => priceChange(e, record)"
-                  @focus="e => priceFocus(record, index)"
-                  style="width: 100%;">
-                  <a-select-option v-if="record.cost" :value="record.cost" :label="record.cost">成本 {{ record.cost }}</a-select-option>
-                  <a-select-option v-if="loadDataSource&&loadDataSource[index]&&loadDataSource[index].provincePrice" :value="loadDataSource[index].provincePrice" :label="loadDataSource[index].provincePrice">A价 {{ loadDataSource[index].provincePrice }}</a-select-option>
-                  <a-select-option v-if="loadDataSource&&loadDataSource[index]&&loadDataSource[index].cityPrice" :value="loadDataSource[index].cityPrice" :label="loadDataSource[index].cityPrice">B价 {{ loadDataSource[index].cityPrice }}</a-select-option>
-                  <a-select-option v-if="loadDataSource&&loadDataSource[index]&&loadDataSource[index].specialPrice" :value="loadDataSource[index].specialPrice" :label="loadDataSource[index].specialPrice">C价 {{ loadDataSource[index].specialPrice }}</a-select-option>
-                </a-select>
+              <template slot="price" slot-scope="text, record, index">
+                <!-- 调往对象为经销商时不可编辑售价,为员工或其他时可编辑售价 -->
+                <div v-if="$route.params.dealerLevel == 'OTHER'">
+                  <a-select
+                    size="small"
+                    id="allocateBillEdit-price"
+                    option-label-prop="label"
+                    v-model="record.price"
+                    placeholder="请选择"
+                    @change="e => priceChange(e, record)"
+                    @focus="e => priceFocus(record, index)"
+                    style="width: 100%;">
+                    <a-select-option v-if="record.cost" :value="record.cost" :label="record.cost">成本 {{ record.cost }}</a-select-option>
+                    <a-select-option v-if="loadDataSource&&loadDataSource[index]&&loadDataSource[index].provincePrice" :value="loadDataSource[index].provincePrice" :label="loadDataSource[index].provincePrice">A价 {{ loadDataSource[index].provincePrice }}</a-select-option>
+                    <a-select-option v-if="loadDataSource&&loadDataSource[index]&&loadDataSource[index].cityPrice" :value="loadDataSource[index].cityPrice" :label="loadDataSource[index].cityPrice">B价 {{ loadDataSource[index].cityPrice }}</a-select-option>
+                    <a-select-option v-if="loadDataSource&&loadDataSource[index]&&loadDataSource[index].specialPrice" :value="loadDataSource[index].specialPrice" :label="loadDataSource[index].specialPrice">C价 {{ loadDataSource[index].specialPrice }}</a-select-option>
+                  </a-select>
+                </div>
+                <span v-else>{{ record.price }}</span>
               </template>
               <!-- 调出数量 -->
               <template slot="qty" slot-scope="text, record">
@@ -200,7 +204,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: this.$route.params.dealerLevel })).then(res => {
+        return queryStockProductPage(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: this.$route.params.dealerLevel == 'OTHER' ? undefined : this.$route.params.dealerLevel })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {

+ 1 - 1
src/views/allocationManagement/transferOut/list.vue

@@ -207,7 +207,7 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
-      this.$router.push({ path: `/allocationManagement/transferOut/add/${data.allocateSn}/${data.targetName}/${data.dealerLevel}` })
+      this.$router.push({ path: `/allocationManagement/transferOut/add/${data.allocateSn}/${data.targetName}/${data.targetType}` })
     },
     //  删除
     handleDel (row) {