Explorar o código

商家仓页面

zhouhao %!s(int64=2) %!d(string=hai) anos
pai
achega
8112e5d474

+ 17 - 9
src/api/stock.js

@@ -91,15 +91,6 @@ export function getcustomerFrontList(params) {
 }
 
 //经销商仓库库存导出(前置)
-// export function getcustomerFrontExport(params) {
-//   return request({
-//     url: '',
-//     method: 'post',
-//     data: params,
-//     responseType: 'blob' //bolb格式的请求方式
-//   })
-// }
-console.log(postBlob)
 export function partsNewInExport(data, name) {
   return postBlob({
     url: '/customer/front/list/export',
@@ -107,3 +98,20 @@ export function partsNewInExport(data, name) {
     name
   })
 }
+//经销商仓库库存列表(商家)
+export function getFrontListCustomer(params) {
+  return request({
+    url: '/customer/front/listCustomer',
+    method: 'post',
+    data: params
+  })
+}
+//经销商仓库库存导出(商家)
+
+export function exportCustomer(data, name) {
+  return postBlob({
+    url: '/customer/front/list/exportCustomer',
+    data,
+    name
+  })
+}

+ 103 - 4
src/views/basic_data/stock/customer_warehouse.vue

@@ -1,13 +1,112 @@
 <template>
-$END$
+  <div>
+    <template-page
+      style="width: 100%;
+      height: 100%;"
+      ref="pageRef"
+      :getList="getList"
+      :exportList="exportList"
+      :columnParsing="columnParsing"
+    >
+    </template-page>
+  </div>
 </template>
 
 <script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+
+import { getFrontListCustomer, exportCustomer } from '@/api/stock'
 export default {
-name: "customer_warehouse"
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '批量删除',
+              click: this.dels,
+              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+            }
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getFrontListCustomer(...p)
+    },
+    // 列表导出函数
+    exportList: exportCustomer,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    }
+    // 批量删除
+    // dels() {
+    //   if (this.recordSelected.length) {
+    //     this.$confirm('此操作将删除数据, 是否继续?', '提示', {
+    //       confirmButtonText: '确定',
+    //       cancelButtonText: '取消',
+    //       type: 'warning'
+    //     })
+    //       .then(() => {
+    //         partsOldOutDel({
+    //           ids: this.recordSelected.map(item => item.id).join(',')
+    //         })
+    //           .then(res => {
+    //             this.$refs.pageRef.refreshList()
+    //             this.$message({
+    //               type: 'success',
+    //               message: '删除成功!'
+    //             })
+    //           })
+    //           .catch(() => {
+    //             this.$message({
+    //               type: 'error',
+    //               message: '删除失败'
+    //             })
+    //           })
+    //       })
+    //       .catch(() => {
+    //         this.$message({
+    //           type: 'info',
+    //           message: '已取消删除'
+    //         })
+    //       })
+    //   } else {
+    //     this.$message({
+    //       type: 'info',
+    //       message: '请先勾选需要删除的数据!'
+    //     })
+    //   }
+    // }
+  }
 }
 </script>
 
-<style scoped>
-
+<style lang="scss" scoped>
+::v-deep .el-table__body-wrapper {
+  height: 100% !important;
+}
 </style>

+ 3 - 3
src/views/supply/apply/apply_list.vue

@@ -7,7 +7,7 @@
           <template #left_btn>
             <el-radio-group v-model="screenForm.status" size="mini" @change="getList()">
               <el-radio-button label="">全部</el-radio-button>
-              <template v-for="(item, index) in statusList" >
+              <template v-for="(item, index) in statusList">
                 <el-radio-button v-if="index !== 3" :key="index" :label="item.value">{{
                     item.label
                   }}
@@ -593,7 +593,7 @@ export default {
         remark: ''
       },
       categoryList: [],
-      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer,
+      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer
 
     }
   },
@@ -820,7 +820,7 @@ export default {
       ids = Array.from(new Set(ids))
       examineBatchApply({
         ids: ids.join(','),
-        examineStatus: this.examineForm.status,
+        examineStatus: this.examineForm.status === 'FAIL' ? 'SAVE' : 'OK',
         approvalRemark: this.examineForm.remark
       }).then(res => {
         this.isShowExamineDialog = false

+ 2 - 1
src/views/supply/apply/engin_list.vue

@@ -851,9 +851,10 @@ export default {
         return item.id
       })
       ids = Array.from(new Set(ids))
+
       examineBatchEngin({
         ids: ids.join(','),
-        examineStatus: this.examineForm.status,
+        examineStatus: this.examineForm.status === 'FAIL' ? 'SAVE' : 'OK',
         approvalRemark: this.examineForm.remark
       }).then(res => {
         this.isShowExamineDialog = false