瀏覽代碼

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

chenrui 1 年之前
父節點
當前提交
40a656717d

+ 3 - 3
src/api/salesDetailNew.js

@@ -176,7 +176,7 @@ export const insertBatchOfWaitDispatch = (params) => {
 
 // 缺货明细
 export const salesStockoutDetail = (params) => {
-  const url = `/sales/detail/queryPageStock`
+  const url = `/oos/detail/queryBySales`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -188,7 +188,7 @@ export const salesStockoutDetail = (params) => {
  
 // 导出缺货明细
 export const exportStockout = params => {
-  const url = `/sales/detail/exportStockout`
+  const url = `/oos/detail/exportSalesOos`
   delete params.priceType
   return axios.request({
     url: url,
@@ -199,7 +199,7 @@ export const exportStockout = params => {
 }
 // 导出分组缺货明细
 export const exportGroupStockout = params => {
-  const url = `/sales/detail/exportGroupStockout`
+  const url = `/oos/detail/exportSalesOosByBrandType`
   delete params.priceType
   return axios.request({
     url: url,

+ 13 - 14
src/views/salesManagement/salesQueryNew/stockOutDetailModal.vue

@@ -19,7 +19,8 @@
         class="sTable fixPagination"
         ref="table"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: 500 }"
@@ -91,7 +92,7 @@ export default {
         this.disabled = true
         delete parameter.tableId
         delete parameter.index
-        return salesStockoutDetail({ isOos: 1, salesBillSn: this.salesBillSn }).then(res => {
+        return salesStockoutDetail({ salesBillSn: this.salesBillSn }).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -112,20 +113,18 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '15%', align: 'center', scopedSlots: { customRender: 'productCode' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '销售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        // { title: '销售金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '缺货数量', dataIndex: 'lackQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', scopedSlots: { customRender: 'productCode' } },
+        { title: '产品名称', dataIndex: 'product.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'product.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'product.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售数量', dataIndex: 'salesQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       
       if (this.$hasPermissions('B_salesDetail_salesPrice')) { // 售价权限
         arr.splice(6, 0, { title: '销售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(7, 0, { title: '销售金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '缺货金额', dataIndex: 'lackAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '销售金额', dataIndex: 'salesAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
@@ -136,7 +135,7 @@ export default {
       _this.exportLoading = true
       _this.disabled = true
       _this.spinning = true
-      hdExportExcel(exportStockout, { isOos: 1, salesBillSn: _this.salesBillSn }, '销售单缺货产品导出', function () {
+      hdExportExcel(exportStockout, { salesBillSn: _this.salesBillSn }, '销售单缺货产品导出', function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.disabled = false
@@ -147,7 +146,7 @@ export default {
       _this.exportClassifyLoading = true
       _this.disabled = true
       _this.spinning = true
-      hdExportExcel(exportGroupStockout, { isOos: 1, salesBillSn: _this.salesBillSn }, '销售单缺货产品分类导出', function () {
+      hdExportExcel(exportGroupStockout, { salesBillSn: _this.salesBillSn }, '销售单缺货产品分类导出', function () {
         _this.exportClassifyLoading = false
         _this.spinning = false
         _this.disabled = false

+ 1 - 1
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -239,7 +239,7 @@ export default {
         { title: '通用编码', dataIndex: 'productEntity.commonCode', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_shortageStatisticsCList_costPrice')) { //  成本价权限
-        arr.splice(15, 0, { title: '缺货成本金额', dataIndex: 'totalCostAmount', width: 90, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(15, 0, { title: '缺货成本金额', dataIndex: 'totalShowCostAmount', width: 90, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       if (this.$hasPermissions('M_shortageStatisticsCList_salesPrice')) { //  售价权限
         const ind = this.$hasPermissions('M_shortageStatisticsCList_costPrice') ? 16 : 15

+ 7 - 2
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -86,6 +86,11 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
+        <template slot="productCode" slot-scope="text, record">
+          <span style="padding-right: 15px;">{{ text }}</span>
+          <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
+          <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
+        </template>
       </s-table>
     </a-spin>
   </a-card>
@@ -155,7 +160,7 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', scopedSlots: { customRender: 'productCode' } },
         { title: '产品名称', dataIndex: 'productName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -166,7 +171,7 @@ export default {
         { title: '产品状态', dataIndex: 'productShowStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_shortageStatisticsPList_costPrice')) { // 成本权限
-        arr.splice(6, 0, { title: '缺货成本金额', dataIndex: 'showCost', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(6, 0, { title: '缺货成本金额', dataIndex: 'totalShowCostAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       if (this.$hasPermissions('M_shortageStatisticsPList_salesPrice')) { // 售价权限
         arr.splice(7, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })

+ 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.113:8660/ocs-admin',
+        target: 'http://192.168.2.113:8660/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: {