Quellcode durchsuchen

产品定价 成本价

chenrui vor 4 Jahren
Ursprung
Commit
f05307768d

+ 5 - 5
src/api/product.js

@@ -74,7 +74,7 @@ export const productBatchOnline = (params) => {
 
 //  产品  定价  列表  分页
 export const productPricingList = (params) => {
-  const url = `/product/queryPricingPage/${params.pageNo}/${params.pageSize}`
+  const url = `/product/pricing/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -86,14 +86,14 @@ export const productPricingList = (params) => {
 //  产品  定价 详情  根据sn查询
 export const productPricingSnDetail = (params) => {
   return axios({
-    url: `/product/getPricingInfo/${params.sn}`,
+    url: `/product/pricing/getPricingInfo/${params.sn}`,
     method: 'get'
   })
 }
 //  产品  定价 编辑
 export const productPricingSave = (params) => {
   return axios({
-    url: '/product/savePricing',
+    url: '/product/pricing/save',
     data: params,
     method: 'post'
   })
@@ -101,7 +101,7 @@ export const productPricingSave = (params) => {
 //  产品  定价 审核
 export const productPricingAudit = (params) => {
   return axios({
-    url: '/product/auditPricing',
+    url: '/product/pricing/audit',
     data: params,
     method: 'post'
   })
@@ -163,7 +163,7 @@ export const productBatchOfflineAudit = (params) => {
 
 //  产品  价格变更记录  列表  分页
 export const productPriceChangeList = (params) => {
-  const url = `/product/queryPriceChangePage/${params.pageNo}/${params.pageSize}`
+  const url = `/product/priceChange/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({

+ 6 - 2
src/views/productManagement/productPricing/editModal.vue

@@ -18,8 +18,11 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
-        <a-form-model-item label="成本价" prop="supplierName">
-          50.00
+        <a-form-model-item label="成本价">
+          <div v-if="detailData && detailData.supplierProductList">
+            <p v-for="(item, index) in detailData.supplierProductList" :key="index" style="margin: 0;">{{ item.cost.toFixed(2) + ' 元 -- ' + item.supplierName + ';' }}</p>
+          </div>
+          <span v-else>--</span>
         </a-form-model-item>
         <a-form-model-item label="省级价" prop="afterProvincePrice">
           <a-input-number
@@ -185,6 +188,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.costPrice = ''
         this.$refs.ruleForm.resetFields()
       }
     },

+ 10 - 3
src/views/productManagement/productPricing/list.vue

@@ -72,7 +72,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 2010 }"
+      :scroll="{ x: 2110 }"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">
@@ -83,6 +83,13 @@
       <template slot="pricingState" slot-scope="text, record">
         <a-badge :color="record.pricingState=='WAIT_PRICING'?'gold':record.pricingState=='WAIT_PRICING_AUDIT'?'volcano':'#87d068'" :text="record.pricingStateDictValue" />
       </template>
+      <!-- 成本价 -->
+      <template slot="sterminaldsdPrice" slot-scope="text, record">
+        <div v-if="record.supplierProductList">
+          <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">{{ item.cost.toFixed(2) + '元 - ' + item.supplierName + ';' }}</p>
+        </div>
+        <span v-else>--</span>
+      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
         <a-button
@@ -129,14 +136,14 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'code', width: 220, align: 'center' },
         { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { title: '产品状态', dataIndex: 'stateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '定价状态', scopedSlots: { customRender: 'pricingState' }, width: 140, align: 'center' },
-        { title: '成本价', dataIndex: 'sterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: 200, align: 'center' },
         { title: '省级价', dataIndex: 'provincePrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '市级价', dataIndex: 'cityPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '特约价', dataIndex: 'specialPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },