Prechádzať zdrojové kódy

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

lilei 4 rokov pred
rodič
commit
6633fc5fdd

+ 2 - 2
src/api/allocLinkageOut.js

@@ -61,7 +61,7 @@ export const allocLinkageOutStock = (params) => {
 //  连锁调拨调出  删除
 export const allocLinkageOutDel = (params) => {
   return axios({
-    url: `/allocLinkageOut/delete/${params.id}`,
+    url: `/allocLinkageOut/delete/${params.sn}`,
     method: 'get'
   })
 }
@@ -83,7 +83,7 @@ export const allocLinkageOutDetailDel = (params) => {
 //  连锁调拨调出  详情  整单删除
 export const allocLinkageOutDetailDelAll = (params) => {
   return axios({
-    url: `/allocLinkageOut/detail/deleteAll/${params.allocationLinkageOutSn}`,
+    url: `/allocLinkageOut/detail/deleteAll/${params.sn}`,
     method: 'get'
   })
 }

+ 8 - 8
src/config/router.config.js

@@ -55,7 +55,7 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '销售管理',
-          icon: 'account-book',
+          icon: 'account-book'
           // permission: 'M_salesManage'
         },
         children: [
@@ -66,7 +66,7 @@ export const asyncRouterMap = [
             component: RouteView,
             meta: {
               title: '销售单查询',
-              icon: 'monitor',
+              icon: 'monitor'
               // permission: 'M_salesQueryList'
             },
             hideChildrenInMenu: true,
@@ -77,12 +77,12 @@ export const asyncRouterMap = [
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/list.vue'),
                 meta: {
                   title: '销售单列表',
-                  icon: 'monitor',
+                  icon: 'monitor'
                   // permission: 'M_salesQueryList'
                 }
               },
               {
-                path: 'detail/:id/:sn',
+                path: 'detail/:sn',
                 name: 'salesDetail',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/detail.vue'),
                 meta: {
@@ -655,7 +655,7 @@ export const asyncRouterMap = [
             component: RouteView,
             meta: {
               title: '店内调出',
-              icon: 'interaction',
+              icon: 'interaction'
               // permission: 'M_storeTransferOutList'
             },
             hideChildrenInMenu: true,
@@ -1267,7 +1267,7 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '财务管理',
-          icon: 'property-safety',
+          icon: 'property-safety'
           // permission: 'M_financial'
         },
         children: [
@@ -1400,7 +1400,7 @@ export const asyncRouterMap = [
             component: RouteView,
             meta: {
               title: '费用管理',
-              icon: 'pound',
+              icon: 'pound'
               // permission: 'M_expenseManagementList'
             },
             hideChildrenInMenu: true,
@@ -1412,7 +1412,7 @@ export const asyncRouterMap = [
                 meta: {
                   title: '费用单列表',
                   icon: 'pound',
-                  hidden: true,
+                  hidden: true
                   // permission: 'M_expenseManagementList'
                 }
               },

+ 96 - 56
src/views/allocationManagement/chainTransferOut/detail.vue

@@ -1,9 +1,16 @@
 <template>
   <div class="chainTransferOutDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="chainTransferOutDetail-back">
+    <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutDetail-cont" >
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <a-button
+          v-if="isEdit"
+          type="primary"
+          size="small"
+          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+          id="chainTransferOutDetail-edit-btn"
+          @click.stop="handleEdit">编辑</a-button>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -11,97 +18,130 @@
         <a-button key="1" type="primary" id="chainTransferOutDetail-print-btn">快速打印</a-button>
       </template>
     </a-page-header>
+    <!-- 基础信息 -->
     <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
-      <!-- 总计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message">审核状态: <strong>支持市级</strong>,完结状态: <strong>支持市级</strong>,调出对象: <strong>支持市级</strong>,调入单号: <strong>2121212</strong>,总成本:¥<strong>6.33</strong>,总数量: <strong>6</strong> </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1085 }"
-        bordered>
-        <!-- 成本小计 -->
-        <template slot="totalCost" slot-scope="text, record">
-          <span>{{ (record.outCost * record.outQty) || 0 }}</span>
-        </template>
-      </s-table>
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调出单号">{{ (basicInfoData&&basicInfoData.allocationLinkageOutNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 产品详情 -->
+    <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="产品详情">
+          <!-- 总计 -->
+          <a-alert type="info" showIcon style="margin-bottom:15px">
+            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+          </a-alert>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ x: 1090 }"
+            bordered>
+          </s-table>
+        </a-collapse-panel>
+      </a-collapse>
     </a-card>
   </div>
 </template>
 
 <script>
-import { allocLinkageOutDetailList } from '@/api/allocLinkageOut'
 import { STable, VSelect } from '@/components'
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailCount } from '@/api/allocLinkageOut'
 export default {
   components: { STable, VSelect },
   data () {
     return {
-      queryParam: {
-        allocationLinkageOutSn: this.$route.params.sn
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      brandData: [], //  产品品牌  下拉数据
-      typeData: [], //  产品类别  下拉数据
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价(¥)', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调出数量', dataIndex: 'outQty', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本小计(¥)', scopedSlots: { customRender: 'totalCost' }, width: 135, align: 'center' }
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调出仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', dataIndex: 'outQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return allocLinkageOutDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+        const params = Object.assign(parameter, { allocationLinkageOutSn: this.$route.params.sn })
+        return allocLinkageOutDetailList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
           }
           this.disabled = false
+          this.getDetailCount(params)
           return data
         })
-      }
+      },
+      basicInfoData: null, //  基本信息
+      productTotal: null //  合计
+    }
+  },
+  computed: {
+    isEdit () {
+      return (this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')
     }
   },
   methods: {
-    //  重置
-    resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
-      this.$refs.table.refresh(true)
-    },
-    //  提交
-    handleSubmit () {},
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
+    },
+    // 基本信息
+    getDetail () {
+      allocLinkageOutDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
+    // 合计
+    getDetailCount (params) {
+      allocLinkageOutDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
+    //  编辑
+    handleEdit () {
+      this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.allocationLinkageOutSn}` })
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+    })
   }
 }
 </script>
 
 <style lang="less">
-  .chainTransferOutDetail-wrap{
-    .chainTransferOutDetail-back{
-      margin-bottom: 15px;
-    }
-    .chainTransferOutDetail-cont{
-      margin-bottom: 15px;
-    }
+  .chainTransferOutDetail-cont{
+    margin-bottom: 15px;
   }
 </style>

+ 1 - 1
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -352,7 +352,7 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
-            allocLinkageOutDetailDelAll({ allocationLinkageOutSn: _this.$route.params.sn }).then(res => {
+            allocLinkageOutDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.getProductList()

+ 8 - 2
src/views/allocationManagement/chainTransferOut/list.vue

@@ -67,7 +67,7 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator">
-      <a-button id="chainTransferOutList-add" type="prim ary" class="button-error" @click="openModal=true">新增</a-button>
+      <a-button id="chainTransferOutList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
     </div>
     <!-- 列表 -->
     <s-table
@@ -202,6 +202,7 @@ export default {
     },
     //  删除
     handleDel (row) {
+      console.log(row, '-----------------------row', row.allocationLinkageOutSn)
       const _this = this
       this.$confirm({
         title: '提示',
@@ -253,7 +254,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/chainTransferOut/detail/${row.id}/${row.allocationLinkageOutSn}` })
+      this.$router.push({ path: `/allocationManagement/chainTransferOut/detail/${row.allocationLinkageOutSn}` })
     },
     //  新增/编辑
     handleEdit (row) {
@@ -268,6 +269,11 @@ export default {
           this.putTenantSnData = []
         }
       })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     }
   },
   beforeRouteEnter (to, from, next) {

+ 11 - 3
src/views/bulkManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -47,7 +47,7 @@
       <a-button id="bulkWarehousingOrder-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
     </div>
     <!-- 供应商 -->
-    <supplier-info-edit-modal :openModal="openSupplierModal" @close="closeSupplierModal" />
+    <supplier-info-edit-modal :openModal="openSupplierModal" @close="closeSupplierModal" @ok="handleOk" :isState="false" />
   </a-modal>
 </template>
 
@@ -113,16 +113,25 @@ export default {
         }
       })
     },
+    // 新增供应商 成功
+    handleOk () {
+      //  获取供应商数据列表,并赋值
+      this.getSupplierList('val')
+    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
     // 供应商下拉数据
-    getSupplierList () {
+    getSupplierList (val) {
       supplierAllList().then(res => {
         if (res.status == 200) {
           this.supplierList = res.data
+          if (val) { //  需将新增加的供应商回填,即不需要用户再选一下
+            this.form.supplierSn = this.supplierList[0].supplierSn
+            this.$refs.ruleForm.clearValidate('supplierSn')
+          }
         } else {
           this.supplierList = []
         }
@@ -141,7 +150,6 @@ export default {
     // 关闭供应商弹框
     closeSupplierModal () {
       this.openSupplierModal = false
-      this.getSupplierList()
     }
   },
   watch: {

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

@@ -4,7 +4,14 @@
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
         <a id="bulkWarehousingOrderDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseSn) || '' }}</p>
+        <a-button
+          v-if="isEdit"
+          type="primary"
+          size="small"
+          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+          id="bulkWarehousingOrderDetail-edit-btn"
+          @click.stop="handleEdit">编辑</a-button>
+        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '' }}</p>
       </template>
       <template slot="tags">
         <a-tag color="red" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
@@ -119,6 +126,11 @@ export default {
       productTotal: null //  合计
     }
   },
+  computed: {
+    isEdit () {
+      return this.basicInfoData && this.basicInfoData.state != 'FINISH'
+    }
+  },
   methods: {
     //  返回列表
     handleBack () {
@@ -143,6 +155,10 @@ export default {
           this.productTotal = null
         }
       })
+    },
+    //  编辑
+    handleEdit () {
+      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/edit/${this.basicInfoData.id}/${this.basicInfoData.sparePartsPurchaseSn}` })
     }
   },
   beforeRouteEnter (to, from, next) {

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

@@ -53,7 +53,7 @@
                   v-model="queryParam.settleState"
                   ref="settleState"
                   id="bulkWarehousingOrderList-settleState"
-                  code=" FINANCIAL_PAY_STATUS"
+                  code="FINANCIAL_PAY_STATUS"
                   placeholder="请选择财务状态"
                   allowClear
                 ></v-select>

+ 4 - 4
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -24,9 +24,9 @@
               <a-form-item label="产品品牌">
                 <a-select
                   placeholder="请选择产品品牌"
-                  id="inventoryQueryList-productBrandSn"
+                  id="inventoryQueryList-brandSn"
                   allowClear
-                  v-model="queryParam.productBrandSn"
+                  v-model="queryParam.brandSn"
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
@@ -123,7 +123,7 @@ export default {
         productCode: '', //  产品编码
         productName: '', //  产品名称
         productOrigCode: '', //  原厂编码
-        productBrandSn: undefined, //  产品品牌
+        brandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品分类1
         productTypeSn2: '', //  产品分类2
         productTypeSn3: '', //  产品分类3
@@ -186,7 +186,7 @@ export default {
   methods: {
     //  重置
     resetSearchForm () {
-      this.queryParam.productBrandSn = undefined
+      this.queryParam.brandSn = undefined
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''

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

@@ -309,7 +309,7 @@ export default {
     },
     // 详情
     handleDetail (row) {
-      this.$router.push({ name: 'salesDetail', params: { id: row.id, sn: row.salesBillSn } })
+      this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
     },
     // 编辑
     handleEdit (row) {

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

@@ -47,7 +47,7 @@
                   v-model="queryParam.status"
                   ref="status"
                   id="chainTransferInList-status"
-                  code="PAYMENT_TYPE"
+                  code="URGENT_STATUS"
                   placeholder="请选择状态"
                   allowClear></v-select>
               </a-form-item>

+ 6 - 1
src/views/supplierManagement/supplierInfo/editModal.vue

@@ -85,7 +85,7 @@
             placeholder="请输入主营内容(最多200个字符)"
             allowClear />
         </a-form-model-item>
-        <a-form-model-item label="状态" prop="enabledFlag">
+        <a-form-model-item label="状态" prop="enabledFlag" v-if="isState">
           <a-radio-group
             name="radioGroup"
             v-model="form.enabledFlag"
@@ -116,6 +116,10 @@ export default {
     itemId: {
       type: [Number, String],
       default: ''
+    },
+    isState: { //  是否显示状态
+      type: Boolean,
+      default: true
     }
   },
   computed: {
@@ -206,6 +210,7 @@ export default {
           supplierSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
+              _this.$emit('ok')
               _this.isShow = false
             }
           })

+ 1 - 0
src/views/supplierManagement/supplierInfo/list.vue

@@ -50,6 +50,7 @@
           class="button-info"
           @click="handleEdit(record)"
           id="supplierInfoList-edit-btn">编辑</a-button>
+        <span v-else>--</span>
       </template>
       <!-- 状态 -->
       <template slot="status" slot-scope="text, record">