zhangdan 3 năm trước cách đây
mục cha
commit
05dcb78fcc

+ 3 - 2
src/views/numsGoodsShelves/accountManagement/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :xl="6" :lg="6" :md="12" :sm="24">
               <a-form-item label="交易时间">
-                <a-range-picker v-model="time" :format="dateFormat" allowClear :disabledDate="disabledDate" format="YYYY-MM-DD"/>
+                <a-range-picker v-model="time" allowClear :disabledDate="disabledDate" format="YYYY-MM-DD"/>
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="6" :md="6" :sm="6" style="padding-top: 4px;">
@@ -47,11 +47,12 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
 import { STable } from '@/components'
 import applyWithdrawal from './applyWithdrawal.vue'
 export default {
-  components: { STable, applyWithdrawal },
+  components: { STable, applyWithdrawal, commonMixin },
   data () {
     return {
       spinning: false,

+ 48 - 12
src/views/numsGoodsShelves/recallManagement/confirmModal.vue

@@ -10,7 +10,10 @@
     @cancel="cancel"
   >
     <a-spin :spinning="spinning" tip="Loading...">
-      <div style="margin-bottom: 10px;">调回单号:{{ currentData.createDate||'--' }}</div>
+      <a-descriptions>
+        <a-descriptions-item label="调回单号">{{ currentData.createDate||'--' }}</a-descriptions-item>
+        <a-descriptions-item label="创建时间">{{ currentData.createDate||'--' }}</a-descriptions-item>
+      </a-descriptions>
       <s-table
         class="sTable fixPagination"
         ref="table"
@@ -22,10 +25,21 @@
         :showPagination="false"
         :defaultLoadData="true"
         bordered>
-        <template slot="action" slot-scope="text, record">
-          <a-input-number id="inputNumber" v-model="value" :min="1" :max="10" @change="onChange" />
+        <template slot="thNum" slot-scope="text, record">
+          <a-input-number
+            id="inputNumber"
+            v-model="record.thNum"
+            :precision="0"
+            :min="0"
+            :max="record.dhNum"
+            placeholder="请输入"
+            @change="onChange" />
         </template>
       </s-table>
+      <div class="btn-cont">
+        <a-button type="primary" id="recallManagement-confirm-modal-save" @click="handleSave">确认退库</a-button>
+        <a-button id="recallManagement-confirm-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
     </a-spin>
   </a-modal>
 </template>
@@ -59,10 +73,10 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'createDate', width: '15%', align: 'center' },
-        { title: '产品名称', dataIndex: 'name', width: '30%', align: 'center' },
-        { title: '调回数量', width: '10%', align: 'center' },
-        { title: '实际退库数量', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } },
-        { title: '单位', width: '10%', align: 'center' }
+        { title: '产品名称', dataIndex: 'name', width: '30%', align: 'left' },
+        { title: '调回数量', dataIndex: 'dhNum', width: '10%', align: 'center' },
+        { title: '实际退库数量', width: '10%', align: 'center', scopedSlots: { customRender: 'thNum' } },
+        { title: '单位', dataIndex: 'danwei', width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -70,7 +84,7 @@ export default {
         // this.spinning = true
         return new Promise(function (resolve, reject) {
           const data = {
-            list: [{ id: 1, createDate: '2020-08-09' }]
+            list: [{ id: 1, createDate: '2020-08-09', name: '监管产品测试001', dhNum: '2', danwei: '个', thNum: '' }]
           }
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = i + 1
@@ -97,14 +111,32 @@ export default {
   },
   computed: {
     title () {
-      // return '调回单退库' + ' —— ' + (this.currentData && this.currentData.createDate ? this.currentData.createDate : '')
+      return '调回单退库' + ' —— ' + (this.currentData && this.currentData.createDate ? this.currentData.createDate : '')
     }
   },
 
   methods: {
     // 保存
-    handleSubmit () {
-      this.$emit('close')
+    handleSave () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '调回产品将退回至经销商仓库,确认退库吗?',
+        centered: true,
+        onOk () {
+          _this.$emit('close')
+          // _this.spinning = true
+          // storeCallOutOut({ storeCallOutSn: row.storeCallOutSn }).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //     _this.spinning = false
+          //   } else {
+          //     _this.spinning = false
+          //   }
+          // })
+        }
+      })
     },
     // 取消
     cancel () {
@@ -119,5 +151,9 @@ export default {
 }
 </script>
 
-<style>
+<style lang="less">
+  .btn-cont {
+  	text-align: center;
+  	margin: 25px 0 10px;
+  }
 </style>

+ 91 - 57
src/views/numsGoodsShelves/recallManagement/list.vue

@@ -7,24 +7,18 @@
           <a-row :gutter="36">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <a-range-picker
-                  :value="time"
-                  allowClear
-                  :disabledDate="disabledDate"
-                  format="YYYY-MM-DD"
-                  style="width: 100%;"
-                  @change="dateChange"/>
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调拨单号">
-                <a-input allowClear placeholder="请输入调拨单号" v-model.tirm="queryParam.danhao"/>
+                <a-input allowClear placeholder="请输入调拨单号" v-model.tirm="queryParam.recallBillNo"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="货架名称">
-                <a-select placeholder="请搜索货架名称" allowClear style="width: 100%;">
-                  <a-select-option v-for="item in goodsShelveList">
+                <a-select placeholder="请搜索货架名称" allowClear style="width: 100%;" v-model="queryParam.shelfSn">
+                  <a-select-option v-for="item in goodsShelveList" >
                     {{ }}
                   </a-select-option>
                 </a-select>
@@ -75,7 +69,7 @@
         </a-tab-pane>
       </a-tabs> -->
 
-      <a-table
+      <s-table
         class="sTable fixPagination"
         ref="table"
         :style="{ height: tableHeight+77+'px' }"
@@ -84,10 +78,9 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y:tableHeight }"
-        :showPagination="false"
-        :defaultLoadData="false"
-        :expandIconColumnIndex="-1"
-        :expandIconAsCell="false"
+        @expand="expand"
+        :defaultLoadData="true"
+        :expandRowByClick="true"
         :defaultExpandAllRows="true"
         bordered>
         <template slot="action" slot-scope="text, record">
@@ -105,15 +98,17 @@
             id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
         </template>
         <a-table
+          size="small"
           class="inner-table"
           slot="expandedRowRender"
-          slot-scope="text"
+          slot-scope="record"
+          :rowKey="(record) => record.id"
           :columns="innerColumns"
           :data-source="innerData"
           :pagination="false"
         >
         </a-table>
-      </a-table>
+      </s-table>
     </a-spin>
     <!-- 申请提现 -->
     <confirmModal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></confirmModal>
@@ -121,12 +116,15 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
+import rangeDate from '@/views/common/rangeDate.vue'
 import { STable } from '@/components'
 import confirmModal from './confirmModal.vue'
 import getDate from '@/libs/getDate.js'
+import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel } from '@/api/shelfRecall.js'
 export default {
-  components: { STable, confirmModal },
+  components: { STable, confirmModal, rangeDate, commonMixin },
   data () {
     return {
       spinning: false,
@@ -145,24 +143,23 @@ export default {
       queryParam: {
         beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
         endDate: getDate.getCurrMonthDays().endtime, // 结束时间
-        danhao: '',
-        name: '',
-        code: ''
+        recallBillNo: '',
+        shelfSn: '' // 数字货架sn
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center' },
-        { title: '调回单号', dataIndex: 'name', width: '30%', align: 'center' },
-        { title: '货架名称', dataIndex: 'remarks', width: '10%', align: 'center', scopedSlots: { customRender: 'remarks' } },
-        { title: '状态', width: '10%', align: 'center' },
-        { title: '调回总量', width: '10%', align: 'center' },
-        { title: '实退总量', width: '10%', align: 'center' },
-        { title: '操作', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } }
+        { title: '调回单号', dataIndex: 'recallBillNo', width: '20%', align: 'center' },
+        { title: '货架名称', dataIndex: 'remarks', width: '20%', align: 'left', scopedSlots: { customRender: 'remarks' } },
+        { title: '状态', dataIndex: 'state', width: '7%', align: 'center' },
+        { title: '调回总量', dataIndex: 'totalQty', width: '9%', align: 'center' },
+        { title: '实退总量', dataIndex: 'totalConfirmQty', width: '9%', align: 'center' },
+        { title: '操作', width: '15%', align: 'left', scopedSlots: { customRender: 'action' } }
       ],
       innerColumns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'createDate', width: '15%', align: 'center' },
-        { title: '产品名称', dataIndex: 'createDate', width: '15%', align: 'center' },
+        { title: '产品编码', dataIndex: 'createDate', width: '20%', align: 'center' },
+        { title: '产品名称', dataIndex: 'createDate', width: '30%', align: 'left' },
         { title: '调回数量', dataIndex: 'createDate', width: '15%', align: 'center' },
         { title: '实退数量', dataIndex: 'createDate', width: '15%', align: 'center' },
         { title: '单位', dataIndex: 'createDate', width: '15%', align: 'center' }
@@ -170,32 +167,32 @@ export default {
       innerData: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        // this.disabled = true
-        // this.spinning = true
-        return new Promise(function (resolve, reject) {
-          const data = {
-            list: [{ id: 1, createDate: '2020-08-09' }]
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          // this.spinning = false
-          // this.disabled = false
-          resolve(data)
-        })
-        // return employeeList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   let data
-        //   if (res.status == 200) {
-        //     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
-        //     }
-        //     this.disabled = false
+        this.disabled = true
+        this.spinning = true
+        // return new Promise(function (resolve, reject) {
+        //   const data = {
+        //     list: [{ id: 1, createDate: '2020-08-09' }]
+        //   }
+        //   for (var i = 0; i < data.list.length; i++) {
+        //     data.list[i].no = i + 1
         //   }
-        //   this.spinning = false
-        //   return data
+        //   // this.spinning = false
+        //   // this.disabled = false
+        //   resolve(data)
         // })
+        return shelfRecallList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            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
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
       }
     }
   },
@@ -213,10 +210,37 @@ export default {
     callback (key) {
       console.log(key)
       this.activeKey = key
+      this.queryParam.billState = key
+      this.$refs.table.refresh(true)
+    },
+    // 点击行或图标触发接口
+    expand (expanded, record) {
+      if (expanded) {
+        console.log(expanded, 'expanded', record)
+        this.getinnerData(record) // 获取表格内部数据
+      }
+    },
+    // 获取子表格数据
+    getinnerData (record) {
+      this.spinning = true
+      shelfRecallDetailList({ shelfSn: record.shelfSn }).then(res => {
+        if (res.status == 200) {
+          this.innerData = res.data
+        } else {
+          this.innerData = []
+        }
+        this.spinning = false
+      })
     },
     // 重置
     resetSearchForm () {
-      this.time = []
+      this.time = [getDate.getCurrMonthDays().starttime, getDate.getCurrMonthDays().endtime]
+      this.queryParam = {
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        recallBillNo: '', // 调回单号
+        shelfSn: '' // 数字货架sn
+      }
     },
     // 申请提现
     handleTX () {
@@ -229,12 +253,22 @@ export default {
     },
     // 取消掉回单
     handleCancel (row) {
+      const _this = this
+      _this.spinning = true
       this.$confirm({
         title: '提示',
         content: '确定取消调回单吗?',
         centered: true,
         onOk: () => {
-          //
+          shelfRecallCancel({}).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.spinning = false
+              _this.$refs.table.refresh()
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },
@@ -288,9 +322,9 @@ export default {
   .accountManagementList-wrap{
     .inner-table{
       background-color: #fff;
+      border-bottom: 1px solid #eee;
       .ant-table{
-         margin: 10px 150px;
-         border-left: 1px solid #eee;
+         margin: 10px 100px;
          border-bottom: 1px solid #eee;
       }
     }

+ 2 - 1
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -56,11 +56,12 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
 import { STable } from '@/components'
 // import applyWithdrawal from './applyWithdrawal.vue'
 export default {
-  components: { STable },
+  components: { STable, commonMixin },
   data () {
     return {
       spinning: false,

+ 2 - 1
src/views/numsGoodsShelves/settlementManagement/settlementDetail.vue

@@ -60,11 +60,12 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getPowerUserList } from '@/api/power-user.js'
 import detailModal from './detailModal.vue'
 export default {
-  components: { STable, VSelect, detailModal },
+  components: { STable, VSelect, detailModal,commonMixin },
   data () {
     return {
       spinning: false,

+ 2 - 1
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -51,11 +51,12 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getPowerUserList } from '@/api/power-user.js'
 // import importHuoweiModal from './importHuoweiModal.vue'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, commonMixin },
   data () {
     return {
       spinning: false,