Quellcode durchsuchen

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into deploy

lilei vor 4 Jahren
Ursprung
Commit
f1e16e1695

+ 1 - 1
src/views/bulkManagement/bulkWarehousingOrder/detail.vue

@@ -7,7 +7,7 @@
         <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseSn) || '' }}</p>
       </template>
       <template slot="tags">
-        <a-tag color="purple" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
+        <a-tag color="red" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
         <a-tag color="orange" v-if="basicInfoData&&basicInfoData.settleStateDictValue">{{ basicInfoData.settleStateDictValue }}</a-tag>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->

+ 3 - 3
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -533,8 +533,8 @@ export default {
       }
     },
     // 合计
-    getDetailCount () {
-      sparePartsPurDetailCount({ sparePartsPurchaseSn: this.$route.params.sn }).then(res => {
+    getDetailCount (params) {
+      sparePartsPurDetailCount(params).then(res => {
         if (res.status == 200) {
           this.productTotal = res.data
         } else {
@@ -604,6 +604,7 @@ export default {
       }
       sparePartsPurDetailList(params).then(res => {
         if (res.status == 200) {
+          this.getDetailCount(params)
           const data = res.data
           this.choosePaginationProps.total = Number(res.data.count) || 0
           this.choosePaginationProps.current = data.pageNo
@@ -654,7 +655,6 @@ export default {
       vm.openModal = false
       vm.getDetail()
       vm.getDealerProductList()
-      vm.getDetailCount()
       vm.getChooseDealerProductList()
       vm.getProductBrand()
       vm.getProductType()

+ 1 - 1
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -16,7 +16,7 @@
     <s-table
       class="sTable"
       ref="table"
-      size="default"
+      size="small"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"

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

@@ -74,7 +74,6 @@
 
 <script>
 import moment from 'moment'
-import { getOperationalPrecision } from '@/libs/tools.js'
 import { custAllList } from '@/api/customer'
 import { giftsDetailList } from '@/api/dealerProduct'
 import { STable, VSelect } from '@/components'
@@ -96,13 +95,13 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
-        { title: '赠品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '赠品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '赠送数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '关联销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '赠送客户', dataIndex: 'customerName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '成本价(¥)', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 120, align: 'center' }
+        { title: '成本小计(¥)', dataIndex: 'totalCost', width: 120, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -120,10 +119,6 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
-            //  赠品名称
-            data.list[i].name = (data.list[i].productEntity && data.list[i].productEntity.name) ? data.list[i].productEntity.name : data.list[i].dealerProductEntity.name
-            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].cost, data.list[i].qty)
           }
           this.disabled = false
           return data

+ 23 - 36
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="urgentItemsOffsetDetail-page-wrapper">
     <!-- 操作 -->
-    <a-page-header :ghost="false" @back="handleBack" class="urgentItemsOffsetDetail-operation-wrapper">
+    <a-page-header :ghost="false" :backIcon="false" class="urgentItemsOffsetDetail-operation-wrapper" >
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="urgentItemsOffsetDetail-btn-back" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="urgentItemsOffsetDetail-btn-back" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -42,7 +42,7 @@
         :rowKey="(record) => record.id"
         :columns="isWriteDown ? columns : unColumns"
         :data="loadData"
-        :scroll="{ x: isWriteDown ? 1330 : '100%' }"
+        :scroll="{ x: isWriteDown ? 1570 : '100%' }"
         bordered>
         <!-- 库存数量 -->
         <template slot="inventoryQuantity" slot-scope="text, record">
@@ -55,35 +55,34 @@
 </template>
 
 <script>
-import { getOperationalPrecision } from '@/libs/tools.js'
-import { urgentDetail } from '@/api/urgent'
-import { urgentDetailList } from '@/api/urgentDetail'
 import { STable, VSelect } from '@/components'
+import { urgentDetail, urgentWriteDown } from '@/api/urgent'
+import { urgentDetailList } from '@/api/urgentDetail'
 export default {
   components: { STable, VSelect },
   data () {
     return {
       unColumns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 160, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 200, align: 'center' },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 200, align: 'center' },
         { title: '库存数量', scopedSlots: { customRender: 'inventoryQuantity' }, width: 100, align: 'center' },
         { title: '未冲减数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' }
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 200, align: 'center' },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库时间', dataIndex: 'stockInDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '成本价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已冲减数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' },
-        { title: '成本小计', dataIndex: 'costSubtotal', width: 100, align: 'center' }
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本小计', dataIndex: 'totalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -93,18 +92,8 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
-            const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
-            const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
-            const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
-            const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
-            data.list[i].productCode = productCode || '--'
-            data.list[i].productName = productName || '--'
-            data.list[i].productOrigCode = productOrigCode || '--'
-            data.list[i].productOrigUnit = productOrigUnit || '--'
             data.list[i].warehouseName = data.list[i].warehouseEntity && data.list[i].warehouseEntity.name || '--'
             data.list[i].warehouseLocationName = data.list[i].warehouseLocationEntity && data.list[i].warehouseLocationEntity.name || '--'
-            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
           }
           this.disabled = false
           return data
@@ -141,15 +130,13 @@ export default {
         content: '确定要进行冲减吗?',
         centered: true,
         onOk () {
-          // delectRolePower({
-          //   id: row.id
-          // }).then(res => {
-          //   console.log(res, 'res1111')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
+          urgentWriteDown({ id: _this.$route.params.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.getDetail()
+              _this.$refs.table.refresh()
+            }
+          })
         }
       })
     },

+ 2 - 6
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -74,13 +74,9 @@
       :data="loadData"
       :scroll="{ x: 1280, y: 300 }"
       bordered>
-      <!-- 状态 -->
-      <template slot="status" slot-scope="text, record">
-        <a-tag :color="record.status=='FINISH'?'green':record.status=='WAIT'?'red':''">{{ record.statusDictValue }}</a-tag>
-      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleDetail(record)" id="urgentItemsOffsetList-detail-btn">详情</a-button>
+        <a-button size="small" type="primary" class="button-success" @click="handleDetail(record)" id="urgentItemsOffsetList-detail-btn">详情</a-button>
       </template>
     </s-table>
   </a-card>
@@ -115,7 +111,7 @@ export default {
         { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '冲减时间', dataIndex: 'offSetTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', scopedSlots: { customRender: 'status' }, width: 100, align: 'center' },
+        { title: '状态', dataIndex: 'statusDictValue', width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象