zhouhao %!s(int64=2) %!d(string=hai) anos
pai
achega
cd74fd7efb
Modificáronse 30 ficheiros con 2684 adicións e 4 borrados
  1. 186 0
      src/views/sales_control/adjust_warehouse.vue
  2. 0 0
      src/views/sales_control/components/WarehouseDetails.vue
  3. 0 0
      src/views/sales_control/components/WarehouseExamine.vue
  4. 0 0
      src/views/sales_control/components/WarehouseForm.vue
  5. 0 0
      src/views/sales_control/customer_warehouse.vue
  6. 0 0
      src/views/sales_control/preposition_stock_list.vue
  7. 0 0
      src/views/sales_control/sales_management/components/customer_sales_details.vue
  8. 0 0
      src/views/sales_control/sales_management/components/customer_sales_form.vue
  9. 0 0
      src/views/sales_control/sales_management/components/return_sales_details.vue
  10. 0 0
      src/views/sales_control/sales_management/components/return_sales_form.vue
  11. 0 0
      src/views/sales_control/sales_management/components/sel-export-column-list.vue
  12. 0 0
      src/views/sales_control/sales_management/components/tableData.js
  13. 191 0
      src/views/sales_control/sales_management/customer_sales_list.vue
  14. 180 0
      src/views/sales_control/sales_management/return_sales_list.vue
  15. 0 0
      src/views/sales_control/stock_three_level.vue
  16. 0 0
      src/views/stock_control/adjust_warehouse.vue
  17. 115 0
      src/views/stock_control/components/WarehouseDetails.vue
  18. 138 0
      src/views/stock_control/components/WarehouseExamine.vue
  19. 153 0
      src/views/stock_control/components/WarehouseForm.vue
  20. 112 0
      src/views/stock_control/customer_warehouse.vue
  21. 112 0
      src/views/stock_control/preposition_stock_list.vue
  22. 246 0
      src/views/stock_control/sales_management/components/customer_sales_details.vue
  23. 231 0
      src/views/stock_control/sales_management/components/customer_sales_form.vue
  24. 173 0
      src/views/stock_control/sales_management/components/return_sales_details.vue
  25. 235 0
      src/views/stock_control/sales_management/components/return_sales_form.vue
  26. 118 0
      src/views/stock_control/sales_management/components/sel-export-column-list.vue
  27. 378 0
      src/views/stock_control/sales_management/components/tableData.js
  28. 2 2
      src/views/stock_control/sales_management/customer_sales_list.vue
  29. 2 2
      src/views/stock_control/sales_management/return_sales_list.vue
  30. 112 0
      src/views/stock_control/stock_three_level.vue

+ 186 - 0
src/views/sales_control/adjust_warehouse.vue

@@ -0,0 +1,186 @@
+<template>
+  <div>
+    <template-page
+      v-if="!pageType"
+      style="width: 100%;
+      height: 100%;"
+      ref="pageRef"
+      :getList="getList"
+      :exportList="exportList"
+      :operation="operation()"
+      :columnParsing="columnParsing"
+      :optionsEvensGroup="optionsEvensGroup"
+    >
+    </template-page>
+    <warehouse-form v-else-if="pageType===1" />
+    <warehouse-examine v-else-if="pageType===2" :detailsId="detailsId" />
+    <warehouse-details v-else="pageType===3" :detailsId="detailsId" />
+  </div>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+
+import { getFrontListCustomerAcc, exportCustomerStockOrderBean, deleteCustomerStockOrder } from '@/api/stock'
+import WarehouseForm from '@/views/stock_control/components/WarehouseForm'
+import WarehouseExamine from '@/views/stock_control/components/WarehouseExamine'
+import WarehouseDetails from '@/views/stock_control/components/WarehouseDetails'
+
+export default {
+  components: { TemplatePage, WarehouseForm, WarehouseExamine, WarehouseDetails },
+  mixins: [import_mixin],
+  data() {
+    return {
+      pageType: 0,
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          // [
+          //   {
+          //     name: '批量删除',
+          //     click: this.dels,
+          //     // isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+          //   }
+          // ],
+          [
+            {
+              name: '审核',
+              click: this.examineWarehouse
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '库存调整',
+              click: this.addWarehouse
+              // isRole: this.$checkBtnRole('add', this.$route.meta.roles)
+            }
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
+      detailsId: ''
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getFrontListCustomerAcc(...p)
+    },
+    // 列表导出函数
+    exportList: exportCustomerStockOrderBean,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    addWarehouse() {
+      this.pageType = 1
+    },
+    examineWarehouse() {
+      this.pageType = 2
+    },
+    detailsWarehouse() {
+      this.pageType = 3
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            <el-button
+              size="mini"
+              type="text" onClick={() => {
+              this.detailsId = row.id
+              this.pageType = 3
+
+            }}
+            >
+              查看
+            </el-button>
+            <el-button
+              size="mini"
+              type="text" onClick={() => {
+              this.detailsId = row.id
+              this.pageType = 2
+            }}
+            >
+              审批
+            </el-button>
+            <el-popconfirm
+              onOnConfirm = {()=>{
+                deleteCustomerStockOrder({ id: row.id }).then(res => {
+                  this.$successMsg('删除成功')
+                  this.$refs.pageRef.refreshList();
+                })              }}
+              title="删除吗?"
+            >
+              <el-button slot="reference" type="text">删除</el-button>
+            </el-popconfirm>
+          </div>
+        )
+      }
+
+    }
+    // 批量删除
+    // 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 lang="scss" scoped>
+::v-deep .el-table__body-wrapper {
+  height: 100% !important;
+}
+</style>

+ 0 - 0
src/views/basic_data/stock/components/WarehouseDetails.vue → src/views/sales_control/components/WarehouseDetails.vue


+ 0 - 0
src/views/basic_data/stock/components/WarehouseExamine.vue → src/views/sales_control/components/WarehouseExamine.vue


+ 0 - 0
src/views/basic_data/stock/components/WarehouseForm.vue → src/views/sales_control/components/WarehouseForm.vue


+ 0 - 0
src/views/basic_data/stock/customer_warehouse.vue → src/views/sales_control/customer_warehouse.vue


+ 0 - 0
src/views/basic_data/stock/preposition_stock_list.vue → src/views/sales_control/preposition_stock_list.vue


+ 0 - 0
src/views/sales/sales_management/components/customer_sales_details.vue → src/views/sales_control/sales_management/components/customer_sales_details.vue


+ 0 - 0
src/views/sales/sales_management/components/customer_sales_form.vue → src/views/sales_control/sales_management/components/customer_sales_form.vue


+ 0 - 0
src/views/sales/sales_management/components/return_sales_details.vue → src/views/sales_control/sales_management/components/return_sales_details.vue


+ 0 - 0
src/views/sales/sales_management/components/return_sales_form.vue → src/views/sales_control/sales_management/components/return_sales_form.vue


+ 0 - 0
src/views/sales/sales_management/components/sel-export-column-list.vue → src/views/sales_control/sales_management/components/sel-export-column-list.vue


+ 0 - 0
src/views/sales/sales_management/components/tableData.js → src/views/sales_control/sales_management/components/tableData.js


+ 191 - 0
src/views/sales_control/sales_management/customer_sales_list.vue

@@ -0,0 +1,191 @@
+<template>
+  <div>
+    <template-page
+      v-if="!pageType"
+      style="width: 100%;
+      height: 100%;"
+      ref="pageRef"
+      :getList="getList"
+      :exportList="exportList"
+      :operation="operation()"
+      :columnParsing="columnParsing"
+      :optionsEvensGroup="optionsEvensGroup"
+    >
+    </template-page>
+    <customer_sales_form :detailsId="detailsId" v-else-if="pageType===1 || pageType ===2" />
+    <customer_sales_details :detailsId="detailsId" v-else />
+  </div>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { delFrontOrder, exportCustomerFrontOrder, getFrontOrderList } from '@/api/sales'
+import customer_sales_form from '@/views/sales_order_management/sales_management/components/customer_sales_form'
+import customer_sales_details from '@/views/sales_order_management/sales_management/components/customer_sales_details'
+
+export default {
+  components: { TemplatePage, customer_sales_form, customer_sales_details },
+  mixins: [import_mixin],
+  data() {
+    return {
+      pageType: 0,
+      detailsId: '',
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '新增',
+              click: () => {
+                this.pageType = 1
+                this.detailsId = ''
+              }
+            }
+          ]
+        ]
+        // [
+        //   [
+        //     {
+        //       name: '编辑',
+        //       click: ()=>{
+        //         this.pageType = 2
+        //       }
+        //     }
+        //   ]
+        // ],
+        // [
+        //   [
+        //     {
+        //       name: '删除',
+        //       click: this.dels
+        //     }
+        //   ]
+        // ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getFrontOrderList(...p)
+    },
+    // 列表导出函数
+    exportList: exportCustomerFrontOrder,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            <el-button
+              size="mini"
+              type="text" onClick={() => {
+              this.detailsId = row.id
+              this.pageType = 3
+
+            }}
+            >
+              查看
+            </el-button>
+            <el-button
+              size="mini"
+              type="text" onClick={() => {
+              this.detailsId = row.id
+              this.pageType = 2
+            }}
+            >
+              编辑
+            </el-button>
+            <el-popconfirm
+              onOnConfirm={() => {
+                delFrontOrder({ id: row.id }).then(res => {
+                  this.$successMsg('删除成功')
+                  this.$refs.pageRef.refreshList()
+                })
+              }}
+              title="删除吗?"
+            >
+              <el-button slot="reference" size="mini" type="text">删除</el-button>
+            </el-popconfirm>
+          </div>
+        )
+      }
+
+    }
+// <el-popconfirm
+//   onOnConfirm = {()=>{
+//     deleteCustomerStockOrder({ id: row.id }).then(res => {
+//       this.$successMsg('删除成功')
+//       this.$refs.pageRef.getTableData()
+//     })              }}
+//   title="删除吗?"
+// >
+//   <el-button slot="reference" type="text">删除</el-button>
+// </el-popconfirm>
+
+    // 批量删除
+    // 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 lang="scss" scoped>
+::v-deep .el-table__body-wrapper {
+  height: 100% !important;
+}
+</style>

+ 180 - 0
src/views/sales_control/sales_management/return_sales_list.vue

@@ -0,0 +1,180 @@
+<template>
+  <div>
+    <template-page
+      v-if="!pageType"
+      style="width: 100%;
+      height: 100%;"
+      ref="pageRef"
+      :getList="getList"
+      :exportList="exportList"
+      :operation="operation()"
+      :columnParsing="columnParsing"
+      :optionsEvensGroup="optionsEvensGroup"
+    >
+    </template-page>
+    <return_sales_form v-else-if="pageType===1 || pageType ===2" :details-id="detailsId"/>
+    <return_sales_details v-else :details-id="detailsId"/>
+  </div>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { delDeleteRefund, exportRefund, getFrontOrderListRefund } from '@/api/sales'
+import return_sales_form from '@/views/sales_order_management/sales_management/components/return_sales_form'
+import return_sales_details from '@/views/sales_order_management/sales_management/components/return_sales_details'
+export default {
+  components: { TemplatePage,return_sales_form,return_sales_details },
+  mixins: [import_mixin],
+  data() {
+    return {
+      detailsId:'',
+      pageType:0,
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '新增',
+              click: ()=>{
+                this.pageType = 1
+                this.detailsId =''
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '编辑',
+              click: ()=>{
+                this.pageType = 1
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '删除',
+              click: this.dels
+            }
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getFrontOrderListRefund(...p)
+    },
+    // 列表导出函数
+    exportList: exportRefund,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            <el-button
+              size="mini"
+              type="text" onClick={() => {
+              this.detailsId = row.id
+              this.pageType = 3
+
+            }}
+            >
+              查看
+            </el-button>
+            <el-button
+              size="mini"
+              type="text" onClick={() => {
+              this.detailsId = row.id
+              this.pageType = 2
+            }}
+            >
+              编辑
+            </el-button>
+            <el-popconfirm
+              onOnConfirm = {()=>{
+                delDeleteRefund({ id: row.id }).then(res => {
+                  this.$successMsg('删除成功')
+                  this.$refs.pageRef.refreshList();
+
+                })              }}
+              title="删除吗?"
+            >
+              <el-button slot="reference" size="mini" type="text">删除</el-button>
+            </el-popconfirm>
+          </div>
+        )
+      }
+
+    }
+
+    // 批量删除
+    // 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 lang="scss" scoped>
+::v-deep .el-table__body-wrapper {
+  height: 100% !important;
+}
+</style>

+ 0 - 0
src/views/basic_data/stock/stock_three_level.vue → src/views/sales_control/stock_three_level.vue


+ 0 - 0
src/views/basic_data/stock/adjust_warehouse.vue → src/views/stock_control/adjust_warehouse.vue


+ 115 - 0
src/views/stock_control/components/WarehouseDetails.vue

@@ -0,0 +1,115 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" content="详情" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <warehousing-header page-type="details" :details="details" />
+    <sales-table :dataList="dataList" :column="column">
+    </sales-table>
+    <div class="warehousing">
+      <div class="diy-table-1">
+        <el-row>
+          <el-col :span="8" class="item">
+            <div class="label">审核人</div>
+            <div class="value">{{ details.approvalName }}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单时间</div>
+            <div class="value">{{ details.approvalTime }}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核结果</div>
+            <div class="value">{{ statusFilter[details.examineStatus] }}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">备注</div>
+            <div class="value">{{ details.approvalRemark }}</div>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import WarehousingHeader from '@/components/WarehousingHeader/WarehousingHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import { getFrontDetail } from '@/api/stock'
+
+export default {
+  name: 'WarehouseExamine',
+  props: ['detailsId'],
+  components: {
+    WarehousingHeader,
+    SalesTable
+  },
+  data() {
+    return {
+      dataList: [],
+      details: {},
+      column: [
+        {
+          prop: 'materialName',
+          label: '产品名称',
+          width: '180'
+        },
+        {
+          prop: 'materialOldNumber',
+          label: '物料编码',
+          width: '180'
+        },
+        {
+          prop: 'specification',
+          label: '规格型号',
+          width: '300'
+        },
+        {
+          prop: 'stockLockQty',
+          label: '库存',
+          width: '180'
+        },
+        {
+          prop: 'directFlag',
+          label: '发生方向',
+          width: '180'
+        },
+        {
+          prop: 'stockChangeQty',
+          label: '数量',
+          width: '180',
+        },
+        {
+          prop: 'remark',
+          label: '备注',
+          width: '180',
+
+        }
+      ],
+      statusFilter: {
+        SAVE: '保存',
+        WAIT: '待审核',
+        OK: '通过',
+        FAIL: '不通过',
+        CLOSE: '关闭'
+      }
+    }
+  },
+  created() {
+    this.getFrontDetail()
+  },
+  methods: {
+    getFrontDetail() {
+      getFrontDetail({ id: this.detailsId }).then(res => {
+        this.details = res.data
+        this.dataList = res.data.orders
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.warehousing {
+  margin: 20px;
+  padding: 20px;
+  box-shadow: 0 0 8px 0 rgb(0 0 0 / 20%);
+}
+</style>

+ 138 - 0
src/views/stock_control/components/WarehouseExamine.vue

@@ -0,0 +1,138 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" content="审核" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <warehousing-header page-type="examine" :details="details" />
+    <sales-table :dataList="dataList" :column="column">
+    </sales-table>
+    <div class="warehousing">
+      <el-form
+        label-position="left"
+        label-width="120px"
+        :model="screenForm"
+        size="mini"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :ms="8" :lg="8">
+            <el-form-item label="审核人" prop="customerNumber" >
+              <el-input disabled v-model="screenForm.customerNumber" placeholder="审核人" size="mini" />
+            </el-form-item>
+          </el-col>
+
+          <el-col :xs="24" :ms="8" :lg="8">
+            <el-form-item label="审核时间" prop="changeTime">
+              <el-date-picker
+                disabled
+                v-model="screenForm.changeTime"
+                type="datetime"
+                size="mini"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                placeholder="选择日期"
+              />
+            </el-form-item>
+          </el-col>
+
+          <el-col :xs="24" :ms="24" :lg="24">
+            <el-form-item label="备注" prop="approvalRemark">
+              <el-input v-model="screenForm.approvalRemark" placeholder="备注" size="mini" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="24" :lg="24">
+            <div>
+              <el-button type="primary" size="mini" @click="handelSubmit('OK')">同意</el-button>
+              <el-button size="mini" @click="handelSubmit('WAIT')">驳回</el-button>
+            </div>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import WarehousingHeader from '@/components/WarehousingHeader/WarehousingHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import { approvalCustomerStockOrder, getFrontDetail } from '@/api/stock'
+
+export default {
+  name: 'WarehouseExamine',
+  props: ['detailsId'],
+  components: {
+    WarehousingHeader,
+    SalesTable
+  },
+  data() {
+    return {
+      dataList: [],
+      screenForm: {approvalRemark:''},
+      details: {},
+      column: [
+        {
+          prop: 'materialName',
+          label: '产品名称',
+          width: '180'
+        },
+        {
+          prop: 'materialOldNumber',
+          label: '物料编码',
+          width: '180'
+        },
+        {
+          prop: 'specification',
+          label: '规格型号',
+          width: '300'
+        },
+        {
+          prop: 'stockLockQty',
+          label: '库存',
+          width: '180'
+        },
+        {
+          prop: 'directFlag',
+          label: '发生方向',
+          width: '180'
+        },
+        {
+          prop: 'stockChangeQty',
+          label: '数量',
+          width: '180',
+        },
+        {
+          prop: 'remark',
+          label: '备注',
+          width: '180',
+
+        }
+      ]
+    }
+  },
+  created() {
+    this.getFrontDetail()
+  },
+  methods: {
+    getFrontDetail() {
+      getFrontDetail({ id: this.detailsId }).then(res => {
+        this.details = res.data
+        this.dataList = res.data.orders
+      })
+    },
+    handelSubmit(type){
+      approvalCustomerStockOrder({
+        ...this.details,
+        examineStatus:type,
+        approvalRemark:this.screenForm.approvalRemark
+      } ).then(res=>{
+        this.$successMsg(type==='OK'?'审核成功':'驳回成功')
+        $parent.pageType=0
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.warehousing {
+  margin: 20px;
+  padding: 20px;
+  box-shadow: 0 0 8px 0 rgb(0 0 0 / 20%);
+}
+</style>

+ 153 - 0
src/views/stock_control/components/WarehouseForm.vue

@@ -0,0 +1,153 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" :content="$parent.pageType=0?'新增':'编辑'" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <warehousing-header ref="header" />
+    <sales-table :dataList="dataList" :column="column" isOperation isSelection @handleSelection="handleSelection">
+      <template #bts>
+        <div>
+          <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>
+          <el-button type="danger" size="mini" @click="delChange">删除</el-button>
+        </div>
+      </template>
+      <template #events>
+        <div>
+          <el-button type="primary" size="mini" @click="handelSubmit">提交</el-button>
+          <el-button size="mini">重置</el-button>
+        </div>
+      </template>
+      <template v-slot:custom="{item:{row,$index}}">
+        <el-radio label="1" v-model="row.flag">增加</el-radio>
+        <el-radio label="-1" v-model="row.flag">减少</el-radio>
+      </template>
+      <template v-slot:operation="{item:{row,$index}}">
+        <el-popconfirm
+          style="margin-left: 10px"
+          title="删除?"
+          @onConfirm="handleDel(row,$index)"
+        >
+          <el-button slot="reference" type="text" size="mini">删除</el-button>
+        </el-popconfirm>
+      </template>
+    </sales-table>
+
+
+    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList" @confirm="confirm" />
+  </div>
+</template>
+
+<script>
+import SalesDialog from '@/components/SalesDialog/SalesDialog'
+import WarehousingHeader from '@/components/WarehousingHeader/WarehousingHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import { getcustomerFrontList, addFrontOrder } from '@/api/stock'
+
+export default {
+  name: 'WarehouseForm',
+  components: {
+    WarehousingHeader,
+    SalesTable,
+    SalesDialog
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      customerNumber:'',
+      dataList: [],
+      selection: [],
+      flag:1,
+      column: [
+        {
+          prop: 'materialName',
+          label: '产品名称',
+          width: '180'
+        },
+        {
+          prop: 'materialOldNumber',
+          label: '物料编码',
+          width: '180'
+        },
+        {
+          prop: 'specification',
+          label: '规格型号',
+          width: '300'
+        },
+        {
+          prop: 'stockLockQty',
+          label: '库存',
+          width: '180'
+        },
+        {
+          prop: 'directFlag',
+          label: '发生方向',
+          width: '180',
+          isCustom: true
+
+        },
+        {
+          prop: 'stockChangeQty',
+          label: '数量',
+          width: '180',
+          isInput: true
+        },
+        {
+          prop: 'remark',
+          label: '备注',
+          width: '180',
+          isInput: true
+
+        }
+      ]
+    }
+  },
+  methods: {
+    getDialogList(p) {
+      return getcustomerFrontList(...p)
+    },
+    confirm(selected) {
+      // console.log(selected)
+      this.dataList = selected
+      this.$refs.header.screenForm.customerName = this.dataList[0].customerName
+      this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
+      this.customerNumber = this.dataList[0].customerNumber
+      this.dialogVisible = false
+
+    },
+    handleDel(item, index) {
+      this.dataList.splice(index, 1)
+    },
+    delChange() {
+      this.dataList.forEach((k, i) => {
+        this.selection.forEach((l, e) => {
+          if (k.id === l.id) {
+            this.dataList.splice(i, 1)
+            this.selection.splice(e, 1)
+          }
+        })
+      })
+    },
+    handleSelection(data) {
+      this.selection = data
+    },
+    handelSubmit() {
+      this.dataList.forEach(k => {
+        k.id = ''
+        k.directFlag = k.flag
+      })
+      const params = {
+        ...this.$refs.header.screenForm,
+        orders: this.dataList
+      }
+      addFrontOrder(params).then(res => {
+        this.$successMsg('新增成功')
+        this.$parent.pageType = 0
+        this.$forceUpdate()
+      })
+    },
+
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 112 - 0
src/views/stock_control/customer_warehouse.vue

@@ -0,0 +1,112 @@
+<template>
+  <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 {
+  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 lang="scss" scoped>
+::v-deep .el-table__body-wrapper {
+  height: 100% !important;
+}
+</style>

+ 112 - 0
src/views/stock_control/preposition_stock_list.vue

@@ -0,0 +1,112 @@
+<template>
+  <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 { getcustomerFrontList, partsNewInExport } from '@/api/stock'
+export default {
+  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 getcustomerFrontList(...p)
+    },
+    // 列表导出函数
+    exportList: partsNewInExport,
+    // 表格列解析渲染数据更改
+    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 lang="scss" scoped>
+::v-deep .el-table__body-wrapper {
+  height: 100% !important;
+}
+</style>

+ 246 - 0
src/views/stock_control/sales_management/components/customer_sales_details.vue

@@ -0,0 +1,246 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" content="详情" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <sales-header ref="header" />
+    <sales-table :dataList="dataList" :column="column"   @handleSelection="handleSelection">
+      <!--      <template #bts>-->
+      <!--        <div>-->
+      <!--          <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>-->
+      <!--          <el-button type="danger" size="mini" @click="delChange">删除</el-button>-->
+      <!--        </div>-->
+      <!--      </template>-->
+      <template #events>
+        <div v-if="details.status==1 || details.status==2">
+          <el-button type="primary" size="mini" @click="handleInform(2)">通知发货</el-button>
+          <el-button size="mini">撤销发货</el-button>
+        </div>
+        <div v-if="details.status==3">
+          <el-button type="primary" size="mini" @click="handleInform(3)">发货</el-button>
+          <el-button size="mini">撤销发货</el-button>
+        </div>
+        <div v-if="details.status==4">
+          <el-button type="primary" size="mini" @click="handleInform(4)">签收</el-button>
+        </div>
+      </template>
+      <template v-slot:custom="{item:{row,$index}}">
+        <el-radio label="1" v-model="row.flag">增加</el-radio>
+        <el-radio label="-1" v-model="row.flag">减少</el-radio>
+      </template>
+      <template v-slot:operation="{item:{row,$index}}">
+        <el-popconfirm
+          style="margin-left: 10px"
+          title="删除?"
+          @onConfirm="handleDel(row,$index)"
+        >
+          <el-button slot="reference" type="text" size="mini">删除</el-button>
+        </el-popconfirm>
+      </template>
+      <!--      <div>-->
+      <!--        <h5>物流信息</h5>-->
+      <!--        <div class="diy-table-1">-->
+      <!--          <el-row>-->
+      <!--            <el-col :span="6" class="item">-->
+      <!--              <div class="label">销售政策编号</div>-->
+      <!--              <div class="value">2222</div>-->
+      <!--            </el-col>-->
+      <!--            <el-col :span="6" class="item">-->
+      <!--              <div class="label">销售政策编号</div>-->
+      <!--              <div class="value">2222</div>-->
+      <!--            </el-col>-->
+      <!--            <el-col :span="6" class="item">-->
+      <!--              <div class="label">销售政策编号</div>-->
+      <!--              <div class="value">2222</div>-->
+      <!--            </el-col>-->
+      <!--            <el-col :span="6" class="item">-->
+      <!--              <div class="label">销售政策编号</div>-->
+      <!--              <div class="value">2222</div>-->
+      <!--            </el-col>-->
+      <!--            <el-col :span="24" class="item">-->
+      <!--              <div class="label">销售政策编号</div>-->
+      <!--              <div class="value">2222</div>-->
+      <!--            </el-col>-->
+      <!--          </el-row>-->
+      <!--        </div>-->
+      <!--        <el-timeline :reverse="reverse">-->
+      <!--          <el-timeline-item-->
+      <!--            v-for="(activity, index) in activities"-->
+      <!--            :key="index"-->
+      <!--            :timestamp="activity.timestamp"-->
+      <!--            :color="activity.color"-->
+      <!--          >-->
+      <!--            {{ activity.content }}-->
+      <!--          </el-timeline-item>-->
+      <!--        </el-timeline>-->
+      <!--      </div>-->
+    </sales-table>
+    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
+                  @confirm="confirm"
+    />
+  </div>
+</template>
+
+<script>
+import SalesDialog from '@/components/SalesDialog/SalesDialog'
+import SalesHeader from '@/components/SalesHeader/SalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import { addFrontOrder, getFrontOrderDetail, sbumitFrontOrder } from '@/api/sales'
+import { getcustomerFrontList } from '@/api/stock'
+
+export default {
+  name: 'WarehouseForm',
+  components: {
+    SalesHeader,
+    SalesTable,
+    SalesDialog
+  },
+  props: ['detailsId'],
+  data() {
+    return {
+      dialogVisible: false,
+      customerNumber: '',
+      dataList: [],
+      details: {},
+      selection: [],
+      flag: 1,
+      column: [
+        {
+          prop: 'materialName',
+          label: '产品名称',
+          width: '180'
+        },
+        {
+          prop: 'materialOldNumber',
+          label: '物料编码',
+          width: '180'
+        },
+        {
+          prop: 'specification',
+          label: '规格型号',
+          width: '300'
+        },
+        {
+          prop: 'stockLockQty',
+          label: '库存数量',
+          width: '180'
+        },
+        {
+          prop: 'qty',
+          label: '数量',
+          width: '180',
+        },
+        {
+          prop: 'volume',
+          label: '体积',
+          width: '180'
+        },
+        {
+          prop: 'totalVolume',
+          label: '总体积',
+          width: '180'
+        },
+        {
+          prop: 'notes',
+          label: '备注',
+          width: '180',
+
+        }
+      ],
+      activities: [{
+        content: '活动按期开始',
+        color: '#0bbd87',
+        timestamp: '2018-04-15'
+      }, {
+        content: '通过审核',
+        timestamp: '2018-04-13'
+      }, {
+        content: '创建成功',
+        timestamp: '2018-04-11'
+      }]
+
+    }
+  },
+  created() {
+    if (this.detailsId) {
+      getFrontOrderDetail({ id: this.detailsId }).then(res => {
+        this.dataList = res.data.orders
+        this.details = res.data
+        this.$refs.header.screenForm = res.data
+        this.$refs.header.screenForm.disabled = true
+
+        this.$refs.header.screenForm.provinceId = res.data.province
+        this.$refs.header.screenForm.cityId = res.data.city
+        this.$refs.header.screenForm.areaId = res.data.area
+        this.$refs.header.screenForm.streetId = res.data.street
+        this.$refs.header.screenForm.stockType = res.data.stockType == 1 ? '前置仓' : '商家仓'
+
+      })
+    }
+  },
+  methods: {
+    getDialogList(p) {
+      return getcustomerFrontList(...p)
+    },
+    confirm(selected) {
+      // console.log(selected)
+      this.dataList = selected
+      this.$refs.header.screenForm.customerName = this.dataList[0].customerName
+      this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
+      this.customerNumber = this.dataList[0].customerNumber
+      this.dialogVisible = false
+
+    },
+    handleDel(item, index) {
+      this.dataList.splice(index, 1)
+    },
+    delChange() {
+      this.dataList.forEach((k, i) => {
+        this.selection.forEach((l, e) => {
+          if (k.id === l.id) {
+            this.dataList.splice(i, 1)
+            this.selection.splice(e, 1)
+          }
+        })
+      })
+    },
+    handleSelection(data) {
+      this.selection = data
+    },
+    handelSubmit() {
+      this.dataList.forEach(k => {
+        k.id = ''
+        k.directFlag = k.flag
+      })
+      const params = {
+        ...this.$refs.header.screenForm,
+        orders: this.dataList
+      }
+      addFrontOrder(params).then(res => {
+        this.$successMsg('新增成功')
+        this.$parent.pageType = 0
+        this.$forceUpdate()
+      })
+    },
+    handelSigning() {
+      this.$confirm('请确定,订单产品客户已完成签收,一旦签收则不能撤销', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(res => {
+
+      }).catch(err => {
+
+      })
+    },
+    handleInform(status = 2) {
+      sbumitFrontOrder({ id: this.$refs.header.screenForm.id, status }).then(res => {
+        this.$successMsg('退货通知')
+      })
+    }
+
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 231 - 0
src/views/stock_control/sales_management/components/customer_sales_form.vue

@@ -0,0 +1,231 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" :content="detailsId?'编辑':'新增'" style=" padding: 20px 20px 0 20px;"
+    ></el-page-header>
+    <sales-header ref="header" />
+    <sales-table :dataList="dataList" :column="column" isOperation isSelection @handleSelection="handleSelection">
+      <template #bts>
+        <div>
+          <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>
+          <el-button type="danger" size="mini" @click="delChange">删除</el-button>
+        </div>
+      </template>
+      <template #events>
+        <div v-if="!detailsId">
+          <el-button type="primary" size="mini" @click="handelSubmit(1)">提交</el-button>
+          <el-button size="mini">重置</el-button>
+          <el-button size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
+        </div>
+        <div v-else>
+          <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
+          <el-button size="mini">重置</el-button>
+        </div>
+      </template>
+      <template v-slot:custom="{item:{row,$index}}">
+        <el-radio label="1" v-model="row.flag">增加</el-radio>
+        <el-radio label="-1" v-model="row.flag">减少</el-radio>
+      </template>
+      <template v-slot:operation="{item:{row,$index}}">
+        <el-popconfirm
+          style="margin-left: 10px"
+          title="删除?"
+          @onConfirm="handleDel(row,$index)"
+        >
+          <el-button slot="reference" type="text" size="mini">删除</el-button>
+        </el-popconfirm>
+      </template>
+    </sales-table>
+    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
+                  @confirm="confirm"
+    />
+  </div>
+</template>
+
+<script>
+import SalesDialog from '@/components/SalesDialog/SalesDialog'
+import SalesHeader from '@/components/SalesHeader/SalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import { addFrontOrder, getFrontOrderDetail, sbumitFrontOrder, updateFrontOrder } from '@/api/sales'
+import { getcustomerFrontList } from '@/api/stock'
+
+export default {
+  name: 'WarehouseForm',
+  components: {
+    SalesHeader,
+    SalesTable,
+    SalesDialog
+  },
+  props: ['detailsId'],
+  data() {
+    return {
+      dialogVisible: false,
+      customerNumber: '',
+      dataList: [],
+      selection: [],
+      disabled:false,
+      flag: 1,
+      dis: true,
+      column: [
+        {
+          prop: 'materialName',
+          label: '产品名称',
+          width: '180'
+        },
+        {
+          prop: 'materialOldNumber',
+          label: '物料编码',
+          width: '180'
+        },
+        {
+          prop: 'specification',
+          label: '规格型号',
+          width: '300'
+        },
+        {
+          prop: 'stockLockQty',
+          label: '库存数量',
+          width: '180'
+        },
+        {
+          prop: 'qty',
+          label: '数量',
+          width: '180',
+          isInput: true
+        },
+        {
+          prop: 'volume',
+          label: '体积',
+          width: '180'
+        },
+        {
+          prop: 'totalVolume',
+          label: '总体积',
+          width: '180'
+        },
+        {
+          prop: 'notes',
+          label: '备注',
+          width: '180',
+          isInput: true,
+          type: 'text'
+
+        }
+      ]
+    }
+  },
+  created() {
+    if (this.detailsId) {
+      getFrontOrderDetail({ id: this.detailsId }).then(res => {
+        this.dataList = res.data.orders
+        this.$refs.header.screenForm = res.data
+        this.$refs.header.screenForm.disabled =this.disabled  = res.data.status !== 1?true:false
+
+        this.$refs.header.screenForm.provinceId = res.data.province
+        this.$refs.header.screenForm.cityId = res.data.city
+        this.$refs.header.screenForm.areaId = res.data.area
+        this.$refs.header.screenForm.streetId = res.data.street
+        this.$refs.header.screenForm.stockType = res.data.stockType == 1 ? '前置仓' : '商家仓'
+      })
+    } else {
+      Object.assign(this.$data, this.$options.data())
+    }
+  },
+  methods: {
+
+    getDialogList(p) {
+      return getcustomerFrontList(...p)
+    },
+    confirm(selected) {
+      console.log(selected)
+      this.dataList = selected
+      this.$refs.header.screenForm.customerName = this.dataList[0].customerName
+      this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
+      this.$refs.header.screenForm.stockType = this.dataList[0].stockType
+      this.customerNumber = this.dataList[0].customerNumber
+      this.dialogVisible = false
+
+    },
+    handleDel(item, index) {
+      this.dataList.splice(index, 1)
+      if (!this.dataList.length) {
+        this.$nextTick(() => {
+          this.$refs.header.screenForm = {}
+          this.customerNumber = ''
+        })
+
+      }
+    },
+    delChange() {
+      this.dataList.forEach((k, i) => {
+        this.selection.forEach((l, e) => {
+          if (k.id === l.id) {
+            this.dataList.splice(i, 1)
+            this.selection.splice(e, 1)
+          }
+        })
+      })
+      if (!this.dataList.length) {
+        this.$nextTick(() => {
+          this.$refs.header.screenForm = {}
+          this.customerNumber = ''
+        })
+
+      }
+    },
+    handleSelection(data) {
+      this.selection = data
+    },
+    handleInform(status = 2) {
+      console.log(33)
+      sbumitFrontOrder({ id: this.$refs.header.screenForm.id, status }).then(res => {
+        console.log(res)
+      })
+    },
+    handelSubmit(type, status = 1) {
+      if (!this.dataList.length) {
+        this.$errorMsg('请添加产品')
+        return
+      }
+      for (let i = 0; i < this.dataList.length; i++) {
+        this.dataList[i].id = ''
+        this.dataList[i].directFlag = this.dataList[i].flag
+        console.log(Number(this.dataList[i].qty))
+
+        if (Number(this.dataList[i].qty) < 0 || !this.dataList[i].qty) {
+          this.$errorMsg(`第${i + 1}产品数量有误`)
+          return
+        }
+      }
+
+      const params = {
+        ...this.$refs.header.screenForm,
+        orders: this.dataList,
+        status: status
+      }
+      if (type == 1) {
+        params.id = ''
+        addFrontOrder(params).then(res => {
+          this.$successMsg('新增成功')
+          this.dis = false
+          // this.$parent.pageType = 0
+
+          this.$forceUpdate()
+        })
+
+      } else {
+        updateFrontOrder(params).then(res => {
+          this.$successMsg('编辑成功')
+          this.$parent.pageType = 0
+          this.$forceUpdate()
+        })
+
+      }
+    }
+
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 173 - 0
src/views/stock_control/sales_management/components/return_sales_details.vue

@@ -0,0 +1,173 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" content="详情" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <return-sales-header ref="header" :details="details" />
+    <sales-table :dataList="dataList" :column="column"   @handleSelection="handleSelection">
+      <template #bts>
+        <div>
+          <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>
+          <el-button type="danger" size="mini" @click="delChange">删除</el-button>
+        </div>
+      </template>
+      <template #events>
+        <div>
+          <el-button type="primary" size="mini" @click="handleInform(2)">通知发货</el-button>
+          <el-button size="mini">撤销发货</el-button>
+        </div>
+      </template>
+
+      <template v-slot:custom="{item:{row,$index}}">
+        <el-radio label="1" v-model="row.flag">增加</el-radio>
+        <el-radio label="-1" v-model="row.flag">减少</el-radio>
+      </template>
+      <template v-slot:operation="{item:{row,$index}}">
+        <el-popconfirm
+          style="margin-left: 10px"
+          title="删除?"
+          @onConfirm="handleDel(row,$index)"
+        >
+          <el-button slot="reference" type="text" size="mini">删除</el-button>
+        </el-popconfirm>
+      </template>
+    </sales-table>
+    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
+                  @confirm="confirm"
+    />
+  </div>
+</template>
+
+<script>
+import SalesDialog from '@/components/SalesDialog/SalesDialog'
+import ReturnSalesHeader from '@/components/ReturnSalesHeader/ReturnSalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import { addFrontOrder, detailRefund, sbumitFrontOrder, sendRefund } from '@/api/sales'
+import { getcustomerFrontList } from '@/api/stock'
+
+export default {
+  name: 'WarehouseForm',
+  components: {
+    ReturnSalesHeader,
+    SalesTable,
+    SalesDialog
+  },
+  props: ['detailsId'],
+  data() {
+    return {
+      dialogVisible: false,
+      customerNumber: '',
+      dataList: [],
+      selection: [],
+      flag: 1,
+      details: {},
+      column: [
+        {
+          prop: 'materialName',
+          label: '产品名称',
+          width: '180'
+        },
+        {
+          prop: 'materialOldNumber',
+          label: '物料编码',
+          width: '180'
+        },
+        {
+          prop: 'specification',
+          label: '规格型号',
+          width: '300'
+        },
+        {
+          prop: 'stockLockQty',
+          label: '库存数量',
+          width: '180'
+        },
+        {
+          prop: 'qty',
+          label: '数量',
+          width: '180',
+        },
+        {
+          prop: 'volume',
+          label: '体积',
+          width: '180'
+        },
+        {
+          prop: 'totalVolume',
+          label: '总体积',
+          width: '180'
+        },
+        {
+          prop: 'notes',
+          label: '备注',
+          width: '180',
+
+        }
+      ]
+    }
+  },
+  created() {
+    if (this.detailsId) {
+      detailRefund({ id: this.detailsId }).then(res => {
+        this.dataList = res.data.orders
+        this.details = res.data
+      })
+    }
+  },
+  methods: {
+    getDialogList(p) {
+      return getcustomerFrontList(...p)
+    },
+    confirm(selected) {
+      // console.log(selected)
+      this.dataList = selected
+      this.$refs.header.screenForm.customerName = this.dataList[0].customerName
+      this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
+      this.customerNumber = this.dataList[0].customerNumber
+      this.dialogVisible = false
+
+    },
+    handleDel(item, index) {
+      this.dataList.splice(index, 1)
+    },
+    delChange() {
+      this.dataList.forEach((k, i) => {
+        this.selection.forEach((l, e) => {
+          if (k.id === l.id) {
+            this.dataList.splice(i, 1)
+            this.selection.splice(e, 1)
+          }
+        })
+      })
+    },
+    handleSelection(data) {
+      this.selection = data
+    },
+    handleInform(status = 2) {
+      console.log(33)
+      sendRefund({ id: this.details.id, status }).then(res => {
+        this.$successMsg('退货通知')
+
+      })
+    },
+    handelSubmit() {
+      this.dataList.forEach(k => {
+        k.id = ''
+        k.directFlag = k.flag
+      })
+      const params = {
+        ...this.$refs.header.screenForm,
+        orders: this.dataList
+      }
+      addFrontOrder(params).then(res => {
+        this.$successMsg('新增成功')
+        this.$parent.pageType = 0
+        this.$forceUpdate()
+      })
+    }
+
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 235 - 0
src/views/stock_control/sales_management/components/return_sales_form.vue

@@ -0,0 +1,235 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" :content="detailsId?'编辑':'新增'" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <return-sales-header ref="header" :details="details"/>
+    <sales-table :dataList="dataList" :column="column" isOperation isSelection @handleSelection="handleSelection">
+      <template #bts>
+        <div>
+          <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>
+          <el-button type="danger" size="mini" @click="delChange">删除</el-button>
+        </div>
+      </template>
+      <template #events>
+        <div v-if="!detailsId">
+          <el-button type="primary" size="mini" @click="handelSubmit(1)">提交</el-button>
+          <el-button size="mini">重置</el-button>
+          <el-button size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
+        </div>
+        <div v-else>
+          <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
+          <el-button size="mini">重置</el-button>
+        </div>
+
+      </template>
+      <template v-slot:custom="{item:{row,$index}}">
+        <el-radio label="1" v-model="row.flag">增加</el-radio>
+        <el-radio label="-1" v-model="row.flag">减少</el-radio>
+      </template>
+      <template v-slot:operation="{item:{row,$index}}">
+        <el-popconfirm
+          style="margin-left: 10px"
+          title="删除?"
+          @onConfirm="handleDel(row,$index)"
+        >
+          <el-button slot="reference" type="text" size="mini">删除</el-button>
+        </el-popconfirm>
+      </template>
+    </sales-table>
+    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList" @confirm="confirm" />
+  </div>
+</template>
+
+<script>
+import SalesDialog from '@/components/SalesDialog/SalesDialog'
+import ReturnSalesHeader from '@/components/ReturnSalesHeader/ReturnSalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import {
+  addFrontOrder, detailRefund,
+  getFrontOrderDetail,
+  addRefund,
+  getFrontOrderList,
+  sbumitFrontOrder,
+  sendRefund,
+  updateRefund
+} from '@/api/sales'
+
+export default {
+  name: 'WarehouseForm',
+  components: {
+    ReturnSalesHeader,
+    SalesTable,
+    SalesDialog
+  },
+  props:['detailsId'],
+  data() {
+    return {
+      dialogVisible: false,
+      customerNumber:'',
+      dataList: [],
+      selection: [],
+      flag:1,
+      dis:true,
+      details:{},
+      column: [
+        {
+          prop: 'materialName',
+          label: '产品名称',
+          width: '180'
+        },
+        {
+          prop: 'materialOldNumber',
+          label: '物料编码',
+          width: '180'
+        },
+        {
+          prop: 'specification',
+          label: '规格型号',
+          width: '300'
+        },
+        {
+          prop: 'qty',
+          label: '发货数量',
+          width: '180'
+        },
+        {
+          prop: 'refundQty',
+          label: '退货数量',
+          width: '180',
+          isInput: true
+        },
+        {
+          prop: 'qty',
+          label: '已退数量',
+          width: '180',
+        },
+        {
+          prop: 'volume',
+          label: '体积',
+          width: '180'
+        },
+        {
+          prop: 'totalVolume',
+          label: '总体积',
+          width: '180'
+        },
+        {
+          prop: 'notes',
+          label: '备注',
+          width: '180',
+          isInput: true,
+          type:'text'
+        }
+      ]
+    }
+  },
+  created() {
+    if (this.detailsId) {
+      detailRefund({id:this.detailsId}).then(res=>{
+        this.dataList = res.data.orders
+        this.details = res.data
+        this.details.customerOrderNo = this.dataList[0].id
+        this.customerNumber=this.dataList[0].customerNumber
+      })
+    }else{
+      Object.assign(this.$data, this.$options.data())
+    }
+  },
+
+  methods: {
+    getDialogList(p) {
+      return getFrontOrderList(...p)
+    },
+    confirm(selected) {
+      console.log(selected)
+      // console.log(selected)
+      this.dataList = selected
+      this.details = this.dataList[0]
+      this.details.customerOrderNo = this.dataList[0].id
+      this.details.id = ''
+      this.customerNumber=this.dataList[0].customerNumber
+       // this.$refs.header.details.customerName = this.dataList[0].customerName
+       // this.$refs.header.details.customerNumber = this.dataList[0].customerNumber
+       // this.$refs.header.details.customerNumber = this.dataList[0].pickTime
+       // this.$refs.header.details.customerNumber = this.dataList[0].userName
+       // this.$refs.header.details.customerNumber = this.dataList[0].phone
+       // this.$refs.header.details.customerNumber = this.dataList[0].stockType
+      this.dialogVisible = false
+
+    },
+    handleDel(item, index) {
+      this.dataList.splice(index, 1)
+      if (!this.dataList.length){
+        this.$nextTick(()=>{
+          this.details = {}
+          this.customerNumber = ''
+        })
+      }
+    },
+    delChange() {
+      this.dataList.forEach((k, i) => {
+        this.selection.forEach((l, e) => {
+          if (k.id === l.id) {
+            this.dataList.splice(i, 1)
+            this.selection.splice(e, 1)
+          }
+        })
+      })
+      if (!this.dataList.length){
+        this.$nextTick(()=>{
+          this.details = {}
+          this.customerNumber = ''
+        })
+      }
+    },
+    handleSelection(data) {
+      this.selection = data
+    },
+
+    handelSubmit(type,status=1) {
+      if (!this.dataList.length){
+        this.$errorMsg('请添加产品')
+        return
+      }
+      for (let i = 0; i < this.dataList.length; i++) {
+        this.dataList[i].id = ''
+        this.dataList[i].directFlag = this.dataList[i].flag
+        if (Number(this.dataList[i].refundQty)<0 || !this.dataList[i].refundQty){
+          this.$errorMsg(`第${i+1}产品退货数量有误`)
+          return
+        }
+      }
+
+      const params = {
+        ...this.$refs.header.details,
+        orders: this.dataList,
+        customerOrderNo:this.details.customerOrderNo,
+        status
+      }
+      if (type===1){
+        params.id = ''
+        addRefund(params).then(res => {
+          this.$successMsg('新增成功')
+          // this.$parent.pageType = 0
+          this.dis =false
+          this.$forceUpdate()
+        })
+
+      }else {
+        updateRefund(params).then(res=>{
+          this.$successMsg('编辑成功')
+          this.$parent.pageType = 0
+          this.$forceUpdate()
+        })
+      }
+    },
+    handleInform(status=2){
+      sendRefund({id:this.$refs.header.details.id,status})
+    }
+
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 118 - 0
src/views/stock_control/sales_management/components/sel-export-column-list.vue

@@ -0,0 +1,118 @@
+<template>
+  <el-dialog
+    title="勾选导出列"
+    :before-close="cancel"
+    :visible.sync="dialogVisible"
+    width="400px"
+  >
+    <el-table
+      :data="exportColumnList"
+      v-bind="{
+        height: '100%',
+        style: 'width: 100%',
+        border: true,
+        headerCellClassName: 'headerRowColor',
+        size: 'mini'
+      }"
+    >
+      <el-table-column
+        v-bind="{
+          label: '显示',
+          prop: '',
+          width: '80px'
+        }"
+      >
+        <template slot="header" slot-scope="scope">
+          <div>
+            <el-checkbox v-model="isExport"></el-checkbox>
+            <span style="margin-left:5px">导出</span>
+          </div>
+        </template>
+        <template slot-scope="scope">
+          <el-checkbox v-model="scope.row.isExport"></el-checkbox>
+        </template>
+      </el-table-column>
+      <el-table-column
+        v-bind="{
+          label: '列名',
+          prop: ''
+        }"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.label }}
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="mini" @click="cancel">取 消</el-button>
+      <el-button size="mini" type="primary" @click="determine">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  props: {
+    columnList: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      isExport: true,
+      exportColumnList: []
+    };
+  },
+  watch: {
+    columnList: {
+      handler() {
+        if (this.columnList && this.columnList.length) {
+          this.exportColumnList = this.columnList.map(item => {
+            return { ...item.exportField, isExport: true };
+          });
+          this.dialogVisible = true;
+        } else {
+          this.exportColumnList = [];
+          this.dialogVisible = false;
+        }
+      },
+      deep: true
+    },
+    exportColumnList: {
+      handler() {
+        this.isExport = this.exportColumnList.every(
+          item => item.isExport === true
+        );
+      },
+      deep: true
+    },
+    isExport() {
+      if (
+        this.exportColumnList.every(item => item.isExport === true) !==
+        this.isExport
+      ) {
+        this.exportColumnList.map(item => {
+          item.isExport = this.isExport;
+        });
+      }
+    }
+  },
+  methods: {
+    cancel() {
+      this.$emit("cancel");
+    },
+    determine() {
+      this.$emit(
+        "determine",
+        this.exportColumnList.filter(item => item.isExport)
+      );
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 378 - 0
src/views/stock_control/sales_management/components/tableData.js

@@ -0,0 +1,378 @@
+export default {
+  data: {
+    records: [
+      {
+        id: '1529270679017484289',
+        identity: '431003199803271316',
+        goodsId: 'W1000',
+        goodsName: '铜管',
+        saleUnit: '米',
+        qty: -25,
+        categoryId: '6',
+        categoryName: '铜管',
+        createTime: '2022-05-25 09:18:37',
+      },
+      {
+        id: '1529270679738904578',
+        identity: '431003199803271316',
+        goodsId: 'W1006',
+        goodsName: '保温棉',
+        saleUnit: '条',
+        qty: -24,
+        categoryId: '4',
+        categoryName: '保温',
+        createTime: '2022-05-25 09:18:37',
+      },
+      {
+        id: '1529280470703071233',
+        identity: '452226198504073614',
+        goodsId: 'W1000',
+        goodsName: '铜管',
+        saleUnit: '米',
+        qty: 30,
+        categoryId: '6',
+        categoryName: '铜管',
+        createTime: '2022-05-25 09:57:32',
+      },
+      {
+        id: '1529282123955101698',
+        identity: '452226198504073614',
+        goodsId: 'W1001',
+        goodsName: '金冷R600a/90G',
+        saleUnit: '瓶',
+        qty: 10,
+        categoryId: '11',
+        categoryName: '冷媒',
+        createTime: '2022-05-25 10:04:06',
+      },
+      {
+        id: '1529284045793583105',
+        identity: '431003199803271316',
+        goodsId: 'W1001',
+        goodsName: '金冷R600a/90G',
+        saleUnit: '瓶',
+        qty: 10,
+        categoryId: '11',
+        categoryName: '冷媒',
+        createTime: '2022-05-25 10:11:44',
+      },
+      {
+        id: '1529286318682726402',
+        identity: '511321198104074414',
+        goodsId: 'W1000',
+        goodsName: '铜管',
+        saleUnit: '米',
+        qty: 0,
+        categoryId: '6',
+        categoryName: '铜管',
+        createTime: '2022-05-25 10:20:46',
+      },
+      {
+        id: '1529293433069559809',
+        identity: '440229197310010077',
+        goodsId: 'W1000',
+        goodsName: '铜管',
+        saleUnit: '米',
+        qty: 8,
+        categoryId: '6',
+        categoryName: '铜管',
+        createTime: '2022-05-25 10:49:02',
+      },
+      {
+        id: '1529300002167513089',
+        identity: '440229197310010077',
+        goodsId: 'W1015',
+        goodsName: '3-5匹角铁地架',
+        saleUnit: '副',
+        qty: 0,
+        categoryId: '13',
+        categoryName: '支架',
+        createTime: '2022-05-25 11:15:08',
+      },
+      {
+        id: '1529392526345297922',
+        identity: '431003199803271316',
+        goodsId: 'W1005',
+        goodsName: '包扎带(挂机)',
+        saleUnit: '卷',
+        qty: -20,
+        categoryId: '30',
+        categoryName: '包扎带',
+        createTime: '2022-05-25 17:22:48',
+      },
+      {
+        id: '1529392527217713154',
+        identity: '431003199803271316',
+        goodsId: 'W1052',
+        goodsName: '包扎带(柜机)',
+        saleUnit: '卷',
+        qty: -2,
+        categoryId: '30',
+        categoryName: '包扎带',
+        createTime: '2022-05-25 17:22:48',
+      },
+      {
+        id: '1529392527284822018',
+        identity: '431003199803271316',
+        goodsId: 'W1003',
+        goodsName: '连接器',
+        saleUnit: '个',
+        qty: -6,
+        categoryId: '31',
+        categoryName: '连接器',
+        createTime: '2022-05-25 17:22:48',
+      },
+      {
+        id: '1529392527356125186',
+        identity: '431003199803271316',
+        goodsId: 'W1002',
+        goodsName: '双壁热缩套管',
+        saleUnit: '条',
+        qty: -6,
+        categoryId: '32',
+        categoryName: '双壁热缩套管',
+        createTime: '2022-05-25 17:22:48',
+      },
+      {
+        id: '1529392527473565698',
+        identity: '431003199803271316',
+        goodsId: 'W1008',
+        goodsName: '电缆',
+        saleUnit: '米',
+        qty: -2,
+        categoryId: '18',
+        categoryName: '电缆',
+        createTime: '2022-05-25 17:22:48',
+      },
+      {
+        id: '1539450903616245761',
+        identity: '430725198907104353',
+        goodsId: 'W1000',
+        goodsName: '铜管',
+        saleUnit: '米',
+        qty: -4,
+        categoryId: '6',
+        categoryName: '铜管',
+        createTime: '2022-06-22 11:31:12',
+      },
+      {
+        id: '1539450903687548929',
+        identity: '430725198907104353',
+        goodsId: 'W1006',
+        goodsName: '保温棉',
+        saleUnit: '条',
+        qty: -2,
+        categoryId: '4',
+        categoryName: '保温',
+        createTime: '2022-06-22 11:31:12',
+      },
+    ],
+    total: 23,
+    size: 15,
+    current: 1,
+    orders: [],
+    optimizeCountSql: true,
+    searchCount: true,
+    countId: null,
+    maxLimit: null,
+    pages: 2,
+  },
+  message: 'success',
+  code: 1,
+  fieldBeans: [
+    {
+      id: '1584740968445440002',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '创建时间',
+      placeholder: null,
+      type: 'datetime',
+      multiple: false,
+      frontCode: null,
+      tbName: null,
+      colName: 'createTime',
+      width: null,
+      sortNum: 0,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'createTime',
+    },
+    {
+      id: '1584740968458022913',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: 'id',
+      placeholder: null,
+      type: 'input',
+      multiple: false,
+      frontCode: '',
+      tbName: 'worker_stock',
+      colName: 'id',
+      width: null,
+      sortNum: 1,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'id',
+    },
+    {
+      id: '1584740968466411522',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '身份证',
+      placeholder: null,
+      type: 'input',
+      multiple: false,
+      frontCode: '',
+      tbName: 'worker_stock',
+      colName: 'identity',
+      width: null,
+      sortNum: 2,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'identity',
+    },
+    {
+      id: '1584740968466411523',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '商品id',
+      placeholder: null,
+      type: 'input',
+      multiple: false,
+      frontCode: '',
+      tbName: 'worker_stock',
+      colName: 'goodsId',
+      width: null,
+      sortNum: 3,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'goodsId',
+    },
+    {
+      id: '1584740968466411524',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '商品名称',
+      placeholder: null,
+      type: 'input',
+      multiple: false,
+      frontCode: '',
+      tbName: 'worker_goods',
+      colName: 'goodsName',
+      width: null,
+      sortNum: 4,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'goodsName',
+    },
+    {
+      id: '1584740968470605827',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '数量',
+      placeholder: null,
+      type: 'number',
+      isTotal: true,
+      multiple: false,
+      frontCode: '',
+      tbName: 'worker_stock',
+      colName: 'qty',
+      width: null,
+      sortNum: 5,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'qty',
+    },
+    {
+      id: '1584740968470605826',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '销售单位',
+      placeholder: null,
+      type: 'input',
+      multiple: false,
+      frontCode: '',
+      tbName: 'worker_goods',
+      colName: 'saleUnit',
+      width: null,
+      sortNum: 6,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'saleUnit',
+    },
+    {
+      id: '1584740968470605828',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '类型id',
+      placeholder: null,
+      type: 'number',
+      multiple: false,
+      frontCode: '',
+      tbName: 'worker_goods',
+      colName: 'categoryId',
+      width: null,
+      sortNum: 7,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'categoryId',
+    },
+    {
+      id: '1584740968470605829',
+      adminUserId: '1417020624153350146',
+      moduleId: 'P1001002',
+      label: '类型名称',
+      placeholder: null,
+      type: 'select',
+      multiple: false,
+      frontCode: 'category',
+      tbName: 'worker_goods',
+      colName: 'categoryName',
+      width: null,
+      sortNum: 8,
+      isShow: true,
+      isCopy: false,
+      createTime: null,
+      createBy: null,
+      updateTime: null,
+      updateBy: null,
+      jname: 'categoryName',
+    },
+  ],
+  typeReference: {
+    type: 'com.gree.material.manager.bean.worker.ZStockBean',
+    typeName: 'class com.gree.material.manager.bean.worker.ZStockBean',
+  },
+};

+ 2 - 2
src/views/sales/sales_management/customer_sales_list.vue → src/views/stock_control/sales_management/customer_sales_list.vue

@@ -21,8 +21,8 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { delFrontOrder, exportCustomerFrontOrder, getFrontOrderList } from '@/api/sales'
-import customer_sales_form from '@/views/sales/sales_management/components/customer_sales_form'
-import customer_sales_details from '@/views/sales/sales_management/components/customer_sales_details'
+import customer_sales_form from '@/views/sales_control/sales_management/components/customer_sales_form'
+import customer_sales_details from '@/views/sales_control/sales_management/components/customer_sales_details'
 
 export default {
   components: { TemplatePage, customer_sales_form, customer_sales_details },

+ 2 - 2
src/views/sales/sales_management/return_sales_list.vue → src/views/stock_control/sales_management/return_sales_list.vue

@@ -21,8 +21,8 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { delDeleteRefund, exportRefund, getFrontOrderListRefund } from '@/api/sales'
-import return_sales_form from '@/views/sales/sales_management/components/return_sales_form'
-import return_sales_details from '@/views/sales/sales_management/components/return_sales_details'
+import return_sales_form from '@/views/sales_control/sales_management/components/return_sales_form'
+import return_sales_details from '@/views/sales_control/sales_management/components/return_sales_details'
 export default {
   components: { TemplatePage,return_sales_form,return_sales_details },
   mixins: [import_mixin],

+ 112 - 0
src/views/stock_control/stock_three_level.vue

@@ -0,0 +1,112 @@
+<template>
+  <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 { getFrontListStockAcc, exportListStockAcc } from '@/api/stock'
+export default {
+  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 getFrontListStockAcc(...p)
+    },
+    // 列表导出函数
+    exportList: exportListStockAcc,
+    // 表格列解析渲染数据更改
+    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 lang="scss" scoped>
+::v-deep .el-table__body-wrapper {
+  height: 100% !important;
+}
+</style>