Procházet zdrojové kódy

Merge branch 'develop' into 11_3_week

# Conflicts:
#	src/components/WarehousingHeader/WarehousingHeader.vue
#	src/views/basic_data/stock/adjust_warehouse.vue
#	src/views/sales/sales_management/customer_sales_list.vue
#	src/views/sales/sales_management/return_sales_list.vue
zhouhao před 2 roky
rodič
revize
2fd37c00f8
25 změnil soubory, kde provedl 2058 přidání a 458 odebrání
  1. 8 0
      src/api/basic_data/dealer.js
  2. 47 0
      src/api/sales.js
  3. 64 8
      src/api/stock.js
  4. 362 160
      src/components/SalesDialog/SalesDialog.vue
  5. 68 23
      src/components/SalesHeader/SalesHeader.vue
  6. 79 81
      src/components/SalesTable/SalesTable.vue
  7. 70 39
      src/components/WarehousingHeader/WarehousingHeader.vue
  8. 1 1
      src/store/modules/user.js
  9. 12 1
      src/views/basic_data/dealer/components/dealer_list-detail.vue
  10. 81 8
      src/views/basic_data/stock/adjust_warehouse.vue
  11. 115 0
      src/views/basic_data/stock/components/WarehouseDetails.vue
  12. 138 0
      src/views/basic_data/stock/components/WarehouseExamine.vue
  13. 153 0
      src/views/basic_data/stock/components/WarehouseForm.vue
  14. 112 0
      src/views/basic_data/stock/stock_three_level.vue
  15. 141 2
      src/views/sales/sales_management/components/customer_sales_details.vue
  16. 141 2
      src/views/sales/sales_management/components/customer_sales_form.vue
  17. 141 2
      src/views/sales/sales_management/components/return_sales_details.vue
  18. 139 2
      src/views/sales/sales_management/components/return_sales_form.vue
  19. 33 8
      src/views/sales/sales_management/customer_sales_list.vue
  20. 33 8
      src/views/sales/sales_management/return_sales_list.vue
  21. 10 1
      src/views/sales_policy/components/AddPolicy.vue
  22. 10 1
      src/views/sales_policy/components/editPolicy.vue
  23. 25 42
      src/views/supply/apply/apply_list.vue
  24. 31 55
      src/views/supply/apply/engin_list.vue
  25. 44 14
      src/views/supply/pickup/components/pickup_form.vue

+ 8 - 0
src/api/basic_data/dealer.js

@@ -16,7 +16,15 @@ export function getDealerInfo(params) {
     params
   })
 }
+// 基础上设置前置仓或商家仓
 
+export function updateCustomer(params) {
+  return request({
+    url: '/customer/update',
+    method: 'post',
+    params
+  })
+}
 //经销商客户存货分类列表
 export function getDealerStockList(params) {
   return request({

+ 47 - 0
src/api/sales.js

@@ -0,0 +1,47 @@
+import request, { postBlob } from '@/utils/request'
+
+// 客户销售单
+export function getFrontOrderList(params) {
+  return request({
+    url: '/customer/frontOrder/list',
+    method: 'post',
+    data: params
+  })
+}
+
+// 客户销售单导出
+export function exportCustomerFrontOrder(data, name) {
+  return postBlob({
+    url: '/customer/frontOrder/list/export',
+    data,
+    name
+  })
+}
+
+// 客户销售单
+export function getFrontOrderListRefund(params) {
+  return request({
+    url: '/customer/frontOrder/listRefund',
+    method: 'post',
+    data: params
+  })
+}
+
+// 客户退货单导出
+export function exportRefund(data, name) {
+  return postBlob({
+    url: '/customer/frontOrder/list/exportRefund',
+    data,
+    name
+  })
+}
+
+///customer/frontOrder/add 新增客户销售单
+
+export function addFrontOrder(params) {
+  return request({
+    url: '/customer/frontOrder/add',
+    method: 'post',
+    data: params
+  })
+}

+ 64 - 8
src/api/stock.js

@@ -63,7 +63,7 @@ export function getListStockToDay(params) {
   })
 }
 
-//库存到货访问通知-列表
+// 库存到货访问通知-列表
 export function getNoticeList(params) {
   return request({
     url: '/stock/visit/list',
@@ -72,7 +72,7 @@ export function getNoticeList(params) {
   })
 }
 
-//库存到货访问通知-数量
+// 库存到货访问通知-数量
 export function getNoticeNum(params) {
   return request({
     url: '/stock/visit/count',
@@ -81,7 +81,7 @@ export function getNoticeNum(params) {
   })
 }
 
-//经销商仓库库存列表(前置)
+// 经销商仓库库存列表(前置)
 export function getcustomerFrontList(params) {
   return request({
     url: '/customer/front/list',
@@ -90,7 +90,7 @@ export function getcustomerFrontList(params) {
   })
 }
 
-//经销商仓库库存导出(前置)
+// 经销商仓库库存导出(前置)
 export function partsNewInExport(data, name) {
   return postBlob({
     url: '/customer/front/list/export',
@@ -98,7 +98,8 @@ export function partsNewInExport(data, name) {
     name
   })
 }
-//经销商仓库库存列表(商家)
+
+// 经销商仓库库存列表(商家)
 export function getFrontListCustomer(params) {
   return request({
     url: '/customer/front/listCustomer',
@@ -106,7 +107,8 @@ export function getFrontListCustomer(params) {
     data: params
   })
 }
-//经销商仓库库存导出(商家)
+
+// 经销商仓库库存导出(商家)
 
 export function exportCustomer(data, name) {
   return postBlob({
@@ -116,7 +118,7 @@ export function exportCustomer(data, name) {
   })
 }
 
-//库存调整管理
+// 库存调整管理
 export function getFrontListCustomerAcc(params) {
   return request({
     url: '/customer/front/listCustomerAcc',
@@ -125,7 +127,7 @@ export function getFrontListCustomerAcc(params) {
   })
 }
 
-//经销商仓库库存导出(商家)
+// 经销商仓库库存导出(商家)
 export function exportCustomerStockOrderBean(data, name) {
   return postBlob({
     url: '/customer/front/list/exportCustomerStockOrderBean',
@@ -133,3 +135,57 @@ export function exportCustomerStockOrderBean(data, name) {
     name
   })
 }
+
+// 库存调整管理三级帐
+export function getFrontListStockAcc(params) {
+  return request({
+    url: '/customer/front/listStockAcc',
+    method: 'post',
+    data: params
+  })
+}
+
+// 经销商三级帐
+export function exportListStockAcc(data, name) {
+  return postBlob({
+    url: '/customer/front/listStockAcc/exportListStockAcc',
+    data,
+    name
+  })
+}
+
+// 新增库存调整
+export function addCustomerStockOrder(params) {
+  return request({
+    url: '/customer/front/addCustomerStockOrder',
+    method: 'post',
+    data: params
+  })
+}
+
+// 审批库存调整
+export function approvalCustomerStockOrder(params) {
+  return request({
+    url: '/customer/front/approvalCustomerStockOrder',
+    method: 'post',
+    data: params
+  })
+}
+
+// 库存调整详情
+export function getFrontDetail(params) {
+  return request({
+    url: '/customer/front/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 库存调整详情
+export function deleteCustomerStockOrder(params) {
+  return request({
+    url: '/customer/front/deleteCustomerStockOrder',
+    method: 'post',
+    data: params
+  })
+}

+ 362 - 160
src/components/SalesDialog/SalesDialog.vue

@@ -4,188 +4,390 @@
       title="添加产品"
       :visible.sync="dialogVisible"
       width="75%"
-      :before-close="handleClose"
     >
-      <div>
-        <el-form label-position="left" label-width="80px" :model="screenForm">
-          <el-form-item label="名称">
-            <el-input v-model="screenForm.name"></el-input>
-          </el-form-item>
-          <el-form-item label="活动区域">
-            <el-input v-model="screenForm.region"></el-input>
-          </el-form-item>
-          <el-form-item label="活动形式">
-            <el-input v-model="screenForm.type"></el-input>
-          </el-form-item>
-        </el-form>
-      </div>
-      <div>
-        <el-table
-          :data="dataList"
-          style="width: 100%"
-          v-bind="tableAttributes"
-        >
-          <el-table-column
-            v-if="isSelection"
-            type="selection"
-            width="55"
-          >
-          </el-table-column>
-          <el-table-column
-            v-if="isIndex"
-            type="index"
-            width="50"
-          >
-          </el-table-column>
-          <el-table-column
-            v-for="(item,index) in column"
-            :key="index"
-            v-bind="{...item,...columnAttributes}"
-          >
-            <template v-slot="{row}">
-              <template v-if="item.isInput">
-                {{ row.prop }}
-              </template>
-              <template v-else>
-                <el-input
-                  v-model.number="row.prop"
-                  class="yinput"
-                  :type="item.type?item.type:'number'"
-                  :placeholder="item.placeholder"
-                  size="mini"
-                  @mousewheel.native.prevent
-                />
-              </template>
-            </template>
-          </el-table-column>
-          <el-table-column v-if="isOperation" fixed="left" label="操作" min-width="250" align="center">
-            <slot>
-              <template v-slot="{row}">
-                <el-popconfirm
-                  style="margin-left: 10px"
-                  title="删除?"
-                  @onConfirm="handleDel(row)"
-                >
-                  <el-button slot="reference" type="text" size="mini">提审</el-button>
-                </el-popconfirm>
-              </template>
-            </slot>
-          </el-table-column>
-        </el-table>
-
-      </div>
-      <div class="pagination clearfix">
-        <div class="fr">
-          <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal"
-          >
-          </el-pagination>
-        </div>
-      </div>
-
+      <template-page
+        style="width: 100%;
+        height: 100%;"
+        ref="pageRef"
+        :getList="getList"
+        :tableAttributes="tableAttributes"
+        :tableEvents="tableEvents"
+      >
+      </template-page>
+      <span slot="footer" class="dialog-footer">
+    <el-button @click="$parent.dialogVisible = false" size="mini">取 消</el-button>
+    <el-button type="primary" @click="confirm" size="mini">确 定</el-button>
+  </span>
     </el-dialog>
   </div>
 </template>
-
 <script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+
 export default {
-  name: 'SalesDialog',
+  components: { TemplatePage },
+  mixins: [import_mixin],
   props: {
-    isShow: {
-      type: Boolean,
-      default: false
-    },
-    screenForm: {
-      type: Object,
-      default: () => {
-        return {}
-      }
-    },
-    isSelection: {
-      type: Boolean,
-      default: false
-    },
-    isIndex: {
-      type: Boolean,
-      default: false
-    },
-    isOperation: {
-      type: Boolean,
-      default: false
-    },
-    tableAttributes: {
-      type: Object,
-      default: () => {
-        return {}
-      }
-    },
-    columnAttributes: {
-      type: Object,
-      default: () => {
-        return {}
-      }
-    },
-    dataList: {
-      type: Array,
-      default: () => {
-        return []
-      }
-    }
+    dialogVisible: false,
+    func: Function
   },
   data() {
     return {
-      dialogVisible: false,
-      column: [
-        {
-          prop: 'date',
-          label: '日期'
-        },
-        {
-          prop: 'date',
-          label: '日期'
-
-        },
-        {
-          prop: 'date',
-          label: '日期'
-
-        }
+      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)
+            }
+          ]
+        ]
       ],
-      currentPage: 1,
-      listTotal: 0
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
     }
   },
-  created() {
-    this.dialogVisible = this.isShow
-  },
   methods: {
-    handleClose(done) {
-      this.$confirm('确认关闭?')
-        .then(_ => {
-          done()
-        })
-        .catch(_ => {
-        })
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return this.func(p)
     },
-    handleDel(row) {
-      console.log(row)
+    // 列表导出函数
+    // exportList: exportCustomerStockOrderBean,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
     },
-    handleSizeChange() {
-
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    addWarehouse() {
+      this.pageType = 1
+    },
+    examineWarehouse() {
+      this.pageType = 2
     },
-    handleCurrentChange() {
+    detailsWarehouse() {
+      this.pageType = 3
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            (
+            <el-button
+              size="mini"
+              type="primary"
+              onClick={() => {
+              }}
+            >
+              查看
+            </el-button>
+            ) }
+            (
+            <el-button
+              size="mini"
+              type="primary"
+              onClick={() => {
+              }}
+            >
+              审批
+            </el-button>
+            ) }
+            {(
+              <el-popconfirm
+                title="是否确定操作?"
+                onConfirm={() => {
+                }}
+              >
+                <el-button size="mini" type="primary" slot="reference">
+                  确认返还
+                </el-button>
+              </el-popconfirm>
+            )}
+          </div>
+        )
+      }
 
+    },
+    confirm(){
+      if (this.recordSelected.length){
+        this.$emit('confirm',this.recordSelected)
+      }else{
+        this.$errorMsg('请选择产品')
+      }
+      // this.$parent.dialogVisible = false
     }
+
+    // 批量删除
+    // 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: 600px !important;
+}
 
+::v-deep .page-button-collection {
+  display: none;
+}
 </style>
+<!--<template>-->
+<!--  <div>-->
+<!--    <el-dialog-->
+<!--      title="添加产品"-->
+<!--      :visible.sync="dialogVisible"-->
+<!--      width="75%"-->
+<!--      :before-close="handleClose"-->
+<!--    >-->
+<!--      <div>-->
+<!--        <el-form label-position="left" label-width="80px" :model="screenForm">-->
+<!--          <el-form-item label="名称">-->
+<!--            <el-input v-model="screenForm.name"></el-input>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="活动区域">-->
+<!--            <el-input v-model="screenForm.region"></el-input>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="活动形式">-->
+<!--            <el-input v-model="screenForm.type"></el-input>-->
+<!--          </el-form-item>-->
+<!--        </el-form>-->
+<!--      </div>-->
+<!--      <div>-->
+<!--        <el-table-->
+<!--          :data="dataList"-->
+<!--          style="width: 100%"-->
+<!--          v-bind="tableAttributes"-->
+<!--        >-->
+<!--          <el-table-column-->
+<!--            v-if="isSelection"-->
+<!--            type="selection"-->
+<!--            width="55"-->
+<!--          >-->
+<!--          </el-table-column>-->
+<!--          <el-table-column-->
+<!--            v-if="isIndex"-->
+<!--            type="index"-->
+<!--            width="50"-->
+<!--          >-->
+<!--          </el-table-column>-->
+<!--          <el-table-column-->
+<!--            v-for="(item,index) in column"-->
+<!--            :key="index"-->
+<!--            v-bind="{...item,...columnAttributes}"-->
+<!--          >-->
+<!--            <template v-slot="{row}">-->
+<!--              <template v-if="item.isInput">-->
+<!--                {{ row.prop }}-->
+<!--              </template>-->
+<!--              <template v-else>-->
+<!--                <el-input-->
+<!--                  v-model.number="row.prop"-->
+<!--                  class="yinput"-->
+<!--                  :type="item.type?item.type:'number'"-->
+<!--                  :placeholder="item.placeholder"-->
+<!--                  size="mini"-->
+<!--                  @mousewheel.native.prevent-->
+<!--                />-->
+<!--              </template>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+<!--          <el-table-column v-if="isOperation" fixed="left" label="操作" min-width="250" align="center">-->
+<!--            <slot>-->
+<!--              <template v-slot="{row}">-->
+<!--                <el-popconfirm-->
+<!--                  style="margin-left: 10px"-->
+<!--                  title="删除?"-->
+<!--                  @onConfirm="handleDel(row)"-->
+<!--                >-->
+<!--                  <el-button slot="reference" type="text" size="mini">提审</el-button>-->
+<!--                </el-popconfirm>-->
+<!--              </template>-->
+<!--            </slot>-->
+<!--          </el-table-column>-->
+<!--        </el-table>-->
+
+<!--      </div>-->
+<!--      <div class="pagination clearfix">-->
+<!--        <div class="fr">-->
+<!--          <el-pagination-->
+<!--            @size-change="handleSizeChange"-->
+<!--            @current-change="handleCurrentChange"-->
+<!--            :current-page="currentPage"-->
+<!--            :page-sizes="[10, 20, 30, 50]"-->
+<!--            :page-size="10"-->
+<!--            layout="total, sizes, prev, pager, next, jumper"-->
+<!--            :total="listTotal"-->
+<!--          >-->
+<!--          </el-pagination>-->
+<!--        </div>-->
+<!--      </div>-->
+
+<!--    </el-dialog>-->
+<!--  </div>-->
+<!--</template>-->
+
+<!--<script>-->
+<!--export default {-->
+<!--  name: 'SalesDialog',-->
+<!--  props: {-->
+<!--    isShow: {-->
+<!--      type: Boolean,-->
+<!--      default: false-->
+<!--    },-->
+<!--    screenForm: {-->
+<!--      type: Object,-->
+<!--      default: () => {-->
+<!--        return {}-->
+<!--      }-->
+<!--    },-->
+<!--    isSelection: {-->
+<!--      type: Boolean,-->
+<!--      default: false-->
+<!--    },-->
+<!--    isIndex: {-->
+<!--      type: Boolean,-->
+<!--      default: false-->
+<!--    },-->
+<!--    isOperation: {-->
+<!--      type: Boolean,-->
+<!--      default: false-->
+<!--    },-->
+<!--    tableAttributes: {-->
+<!--      type: Object,-->
+<!--      default: () => {-->
+<!--        return {}-->
+<!--      }-->
+<!--    },-->
+<!--    columnAttributes: {-->
+<!--      type: Object,-->
+<!--      default: () => {-->
+<!--        return {}-->
+<!--      }-->
+<!--    },-->
+<!--    dataList: {-->
+<!--      type: Array,-->
+<!--      default: () => {-->
+<!--        return []-->
+<!--      }-->
+<!--    }-->
+<!--  },-->
+<!--  data() {-->
+<!--    return {-->
+<!--      dialogVisible: false,-->
+<!--      column: [-->
+<!--        {-->
+<!--          prop: 'date',-->
+<!--          label: '日期'-->
+<!--        },-->
+<!--        {-->
+<!--          prop: 'date',-->
+<!--          label: '日期'-->
+
+<!--        },-->
+<!--        {-->
+<!--          prop: 'date',-->
+<!--          label: '日期'-->
+
+<!--        }-->
+<!--      ],-->
+<!--      currentPage: 1,-->
+<!--      listTotal: 0-->
+<!--    }-->
+<!--  },-->
+<!--  created() {-->
+<!--    this.dialogVisible = this.isShow-->
+<!--  },-->
+<!--  methods: {-->
+<!--    handleClose(done) {-->
+<!--      this.$confirm('确认关闭?')-->
+<!--        .then(_ => {-->
+<!--          done()-->
+<!--        })-->
+<!--        .catch(_ => {-->
+<!--        })-->
+<!--    },-->
+<!--    handleDel(row) {-->
+<!--      console.log(row)-->
+<!--    },-->
+<!--    handleSizeChange() {-->
+
+<!--    },-->
+<!--    handleCurrentChange() {-->
+
+<!--    }-->
+<!--  }-->
+<!--}-->
+<!--</script>-->
+
+<!--<style scoped>-->
+
+<!--</style>-->

+ 68 - 23
src/components/SalesHeader/SalesHeader.vue

@@ -1,30 +1,31 @@
 <template>
   <div class="sales">
     <el-form :rules="rules" label-position="left" label-width="120px" :model="screenForm" size="mini">
-      <el-row gutter="20">
+      <el-row :gutter="20">
         <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="销售订单号" prop="name">
-            <el-input v-model="screenForm.code" placeholder="销售订单号" size="mini" />
+          <el-form-item label="销售订单号" prop="id">
+            <el-input v-model="screenForm.id" placeholder="销售订单号" size="mini" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="商家编号" prop="code">
-            <el-input v-model="screenForm.code" placeholder="商家编号" size="mini" />
+          <el-form-item label="商家编号" prop="customerNumber">
+            <el-input v-model="screenForm.customerNumber" placeholder="商家编号" size="mini" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="商家名称" prop="code">
-            <el-input v-model="screenForm.code" placeholder="商家名称" size="mini" />
+          <el-form-item label="商家名称" prop="customerName">
+            <el-input v-model="screenForm.customerName" placeholder="商家名称" size="mini" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="配送日期" prop="code">
+          <el-form-item label="配送日期" prop="pickTime">
             <el-date-picker
-              v-model="screenForm.value1"
+              v-model="screenForm.pickTime"
               type="datetime"
               size="mini"
               value-format="yyyy-MM-dd HH:mm:ss"
-              placeholder="选择日期">
+              placeholder="选择日期"
+            >
             </el-date-picker>
           </el-form-item>
         </el-col>
@@ -35,32 +36,50 @@
         </el-col>
         <el-col :xs="24" :ms="6" :lg="6">
           <el-form-item label="发货仓库名称" prop="code">
-            <el-input v-model="screenForm.code" placeholder="发货仓库名称" size="mini" />
+            <el-select v-model="screenForm.stockType" placeholder="请选择" clearable>
+              <el-option
+                label="前置"
+                value="1"
+              />
+              <el-option
+                label="i商家"
+                value="2"
+              />
+            </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="用户名称" prop="code">
-            <el-input v-model="screenForm.code" placeholder="用户名称" size="mini" />
+          <el-form-item label="用户名称" prop="userName">
+            <el-input v-model="screenForm.userName" placeholder="用户名称" size="mini" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="用户电话" prop="code">
-            <el-input v-model="screenForm.code" placeholder="用户电话" size="mini" />
+          <el-form-item label="用户电话" prop="phone">
+            <el-input v-model="screenForm.phone" placeholder="用户电话" size="mini" />
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="地区" prop="code">
-            <el-input v-model="screenForm.code" placeholder="地区" size="mini" />
+        <el-col :xs="24" :ms="18" :lg="18" style="display: flex;" class="custom">
+          <el-form-item label="省" prop="province" class="item">
+            <el-input v-model="screenForm.province" placeholder="省" size="mini" />
+          </el-form-item>
+          <el-form-item label="市" prop="city" label-width="50px">
+            <el-input v-model="screenForm.city" placeholder="市" size="mini" />
+          </el-form-item>
+          <el-form-item label="区" prop="area" label-width="50px">
+            <el-input v-model="screenForm.area" placeholder="区" size="mini" />
+          </el-form-item>
+          <el-form-item label="街道" prop="street" label-width="50px">
+            <el-input v-model="screenForm.street" placeholder="街道" size="mini" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="6" :lg="6">
-          <el-form-item label="送货地址" prop="code">
-            <el-input v-model="screenForm.code" placeholder="送货地址" size="mini" />
+          <el-form-item label="送货地址" prop="receAddress">
+            <el-input v-model="screenForm.receAddress" placeholder="送货地址" size="mini" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="24" :lg="24">
-          <el-form-item label="备注" prop="code">
-            <el-input v-model="screenForm.code" placeholder="备注" size="mini" />
+          <el-form-item label="备注" prop="notes">
+            <el-input v-model="screenForm.notes" placeholder="备注" size="mini" />
           </el-form-item>
         </el-col>
       </el-row>
@@ -73,7 +92,21 @@ export default {
   name: 'SalesHeader',
   data() {
     return {
-      screenForm: {},
+      screenForm: {
+        id:'',
+        city:'',
+        area:'',
+        province:'',
+        street:'',
+        customerNumber:'',
+        customerName:'',
+        pickTime:'',
+        stockType:'',
+        userName:'',
+        phone:'',
+        receAddress:'',
+        notes: ''
+      },
       rules: {
         name: [
           { required: true, message: '请输入销售订单号', trigger: 'blur' },
@@ -101,4 +134,16 @@ export default {
   padding: 20px;
   box-shadow: 0 0 8px 0 rgb(0 0 0 / 20%);
 }
+
+.custom {
+  .item {
+    ::v-deep .el-form-item__label:first-child {
+      text-align: left;
+    }
+  }
+
+  ::v-deep .el-form-item__label {
+    text-align: center;
+  }
+}
 </style>

+ 79 - 81
src/components/SalesTable/SalesTable.vue

@@ -4,21 +4,22 @@
       <h5>销售订单明细</h5>
     </slot>
     <slot name="bts">
-<!--      <div>-->
-<!--        <el-button type="primary" size="mini">添加</el-button>-->
-<!--        <el-button type="danger" size="mini">删除</el-button>-->
-<!--      </div>-->
     </slot>
     <div class="table">
       <el-table
         :data="dataList"
         style="width: 100%"
         v-bind="tableAttributes"
+        @select-all="handleSelectionAllChange"
+        @selection-change="handleSelectionAllChange"
       >
         <el-table-column
           v-if="isSelection"
+          align="left"
+          style="padding-left: 10px;"
           type="selection"
           width="55"
+
         >
         </el-table-column>
         <el-table-column
@@ -30,15 +31,17 @@
         <el-table-column
           v-for="(item,index) in column"
           :key="index"
+          show-overflow-tooltip
           v-bind="{...item,...columnAttributes}"
+          :prop="item.prop"
         >
-          <template v-slot="{row}">
-            <template v-if="item.isInput">
-              {{ row.prop }}
+          <template v-slot="{row,$index}">
+            <template v-if="!item.isInput">
+              {{ row[item.prop] }}
             </template>
             <template v-else>
               <el-input
-                v-model.number="row.prop"
+                v-model.number="row[item.prop] "
                 class="yinput"
                 :type="item.type?item.type:'number'"
                 :placeholder="item.placeholder"
@@ -46,69 +49,65 @@
                 @mousewheel.native.prevent
               />
             </template>
+            <template v-if="item.isCustom">
+                <slot name="custom" v-bind:item="{row,$index}">
+                </slot>
+            </template>
           </template>
         </el-table-column>
-        <el-table-column v-if="isOperation" fixed="left" label="操作" min-width="250" align="center">
-          <slot>
-            <template v-slot="{row}">
-              <el-popconfirm
-                style="margin-left: 10px"
-                title="删除?"
-                @onConfirm="handleDel(row)"
-              >
-                <el-button slot="reference" type="text" size="mini">提审</el-button>
-              </el-popconfirm>
-            </template>
-          </slot>
+        <el-table-column v-if="isOperation" fixed="right" label="操作" min-width="100" align="center">
+          <template v-slot="{row,$index}">
+            <slot name="operation" v-bind:item="{row,$index}">
+            </slot>
+          </template>
         </el-table-column>
       </el-table>
     </div>
     <slot />
-<!--    <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="6" 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>-->
+    <!--    <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="6" 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>-->
     <slot name="events">
       <div>
-<!--        <el-button type="primary" size="mini">保存</el-button>-->
-<!--        <el-button size="mini">重置</el-button>-->
-        <el-button type="primary" size="mini">提交</el-button>
-        <el-button size="mini">重置</el-button>
-        <el-button size="mini">通知退货</el-button>
-
+        <!--        <el-button type="primary" size="mini">保存</el-button>-->
+        <!--        <el-button size="mini">重置</el-button>-->
+        <!--        <el-button type="primary" size="mini">提交</el-button>-->
+        <!--        <el-button size="mini">重置</el-button>-->
+        <!--        <el-button size="mini">通知退货</el-button>-->
       </div>
     </slot>
   </div>
@@ -147,26 +146,16 @@ export default {
       default: () => {
         return []
       }
+    },
+    column: {
+      type: Array,
+      default: () => {
+        return []
+      }
     }
   },
   data() {
     return {
-      column: [
-        {
-          prop: 'date',
-          label: '日期'
-        },
-        {
-          prop: 'date',
-          label: '日期'
-
-        },
-        {
-          prop: 'date',
-          label: '日期'
-
-        }
-      ],
       activities: [{
         content: '活动按期开始',
         color: '#0bbd87',
@@ -177,13 +166,18 @@ export default {
       }, {
         content: '创建成功',
         timestamp: '2018-04-11'
-      }]
+      }],
+      selection: []
     }
   },
   methods: {
     handleDel(row) {
       console.log(row)
-    }
+    },
+    handleSelectionAllChange(data) {
+      this.$emit('handleSelection', data)
+    },
+
   }
 }
 </script>
@@ -195,6 +189,10 @@ export default {
   box-shadow: 0 0 8px 0 rgb(0 0 0 / 20%);
 }
 
+::v-deep .el-table-column--selection .cell {
+  padding: 0 10px 0 10px;
+}
+
 .diy-table-1 {
   margin: 20px 0;
 }

+ 70 - 39
src/components/WarehousingHeader/WarehousingHeader.vue

@@ -1,75 +1,92 @@
 <template>
   <div class="warehousing">
-    <el-form v-if="pageTyep==='add'" :rules="rules" label-position="left" label-width="120px" :model="screenForm" size="mini">
-      <el-row gutter="20">
+    <el-form
+      v-if="pageType==='add'"
+      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="name">
-            <el-input v-model="screenForm.code" placeholder="商家编号" size="mini" />
+          <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="code">
-            <el-input v-model="screenForm.code" placeholder="商家名称" size="mini" />
+          <el-form-item label="商家名称" prop="customerName">
+            <el-input disabled v-model="screenForm.customerName" placeholder="商家名称" size="mini" />
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :ms="8" :lg="8">
-          <el-form-item label="调整日期" prop="code">
-            <el-input v-model="screenForm.code" placeholder="调整日期" size="mini" />
+        <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="8" :lg="8">
-          <el-form-item label="制单人" prop="code">
-            <el-input v-model="screenForm.code" placeholder="制单人" size="mini" />
+          <el-form-item label="制单人" prop="createBy">
+            <el-input disabled v-model="screenForm.createBy" placeholder="制单人" size="mini" />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :ms="8" :lg="8">
-          <el-form-item label="制单时间" prop="code">
-            <el-input v-model="screenForm.code" placeholder="制单时间" size="mini" />
+          <el-form-item label="制单时间" prop="createTime">
+            <el-date-picker
+              disabled
+              v-model="screenForm.createTime"
+              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="code">
-            <el-input v-model="screenForm.code" placeholder="备注" size="mini" />
+          <el-form-item label="备注" prop="remark">
+            <el-input v-model="screenForm.remark" placeholder="备注" size="mini" />
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
     <div v-else>
       <h5>单据信息</h5>
-      <div  class="diy-table-1">
+      <div class="diy-table-1">
         <el-row>
           <el-col :span="6" class="item">
             <div class="label">调整单号</div>
-            <div class="value">2222</div>
+            <div class="value">{{ details.id }}</div>
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">商家编号</div>
-            <div class="value">2222</div>
+            <div class="value">{{ details.customerNumber }}</div>
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">商家名称</div>
-            <div class="value">2222</div>
+            <div class="value">{{ details.customerName }}</div>
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">调整日期</div>
-            <div class="value">2222</div>
+            <div class="value">{{ details.changeTime }}</div>
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">制单人</div>
-            <div class="value">2222</div>
+            <div class="value">{{ details.createBy }}</div>
           </el-col>
           <el-col :span="18" class="item">
             <div class="label">制单时间</div>
-            <div class="value">2222</div>
+            <div class="value">{{ details.createTime }}</div>
           </el-col>
           <el-col :span="24" class="item">
             <div class="label">备注</div>
-            <div class="value">2222</div>
+            <div class="value">{{ details.remark }}</div>
           </el-col>
 
         </el-row>
       </div>
-
     </div>
   </div>
 </template>
@@ -78,28 +95,42 @@
 export default {
   name: 'WarehousingHeader',
   props: {
-    pageTyep: {
+    pageType: {
       type: String,
       default: 'add'
+    },
+    details: {
+      type: Object,
+      default: () => {
+        return {}
+      }
     }
   },
   data() {
     return {
-      screenForm: {},
+      screenForm: {
+        changeTime: '',
+        createBy: '',
+        createTime: '',
+        customerName: '',
+        customerNumber: '',
+        remark: ''
+      },
       rules: {
-        name: [
-          { required: true, message: '请输入销售订单号', trigger: 'blur' },
-          { required: true, message: '请输入商家编号', trigger: 'blur' },
-          { required: true, message: '请输入商家名称', trigger: 'blur' },
-          { required: true, message: '请输入配送日期', trigger: 'blur' },
-          { required: true, message: '请输入发货仓库编号', trigger: 'blur' },
-          { required: true, message: '请输入发货仓库名称', trigger: 'blur' },
-          { required: true, message: '请输入用户名称', trigger: 'blur' },
-          { required: true, message: '请输入用户电话', trigger: 'blur' },
-          { required: true, message: '请输入商家编号', trigger: 'blur' },
-          { required: true, message: '请输入送货地址', trigger: 'blur' },
-          { required: true, message: '请输入备注', trigger: 'blur' }
-
+        customerNumber: [
+          { required: true, message: '请输入商家编号', trigger: 'blur' }
+        ],
+        customerName: [
+          { required: true, message: '请输入商家名称', trigger: 'blur' }
+        ],
+        changeTime: [
+          { required: true, message: '请选择调整日期', trigger: 'blur' }
+        ],
+        createBy: [
+          { required: true, message: '请选择制单人', trigger: 'blur' }
+        ],
+        createTime: [
+          { required: true, message: '请选择制单时间', trigger: 'blur' }
         ]
       }
     }

+ 1 - 1
src/store/modules/user.js

@@ -108,7 +108,7 @@ const actions = {
           }
           console.log(data)
           let websitNumber
-          const { nickName, userName, customerId, customerName, customerNumber } = data
+          const { nickName, userName, customerId, customerName, customerNumber, isFront } = data
 
           if (data.adminWebsit) {
             websitNumber = data.adminWebsit.websitNumber

+ 12 - 1
src/views/basic_data/dealer/components/dealer_list-detail.vue

@@ -270,7 +270,9 @@
               <el-form-item label="是否前置仓" prop="">
                 <el-radio v-model="infoList.isFront" :label="true">前置仓</el-radio>
                 <el-radio v-model="infoList.isFront" :label="false">经销商自有仓库</el-radio>
+                <el-button type="primary" size="mini" @click="handelSubmit">修改</el-button>
               </el-form-item>
+
             </el-col>
           </el-row>
           <el-form-item label="分子公司" prop="">
@@ -283,11 +285,12 @@
         </el-form>
       </div>
     </el-card>
+
   </div>
 </template>
 
 <script>
-import { getDealerInfo } from '@/api/basic_data/dealer'
+import { getDealerInfo, updateCustomer } from '@/api/basic_data/dealer'
 
 export default {
   props: {
@@ -310,6 +313,14 @@ export default {
   methods: {
     goBack() {
       this.$parent.isShow = true
+    },
+    handelSubmit(){
+      updateCustomer({
+        id:this.infoList.id,
+        isFront:this.infoList.isFront
+      }).then(res=>{
+        this.$successMsg(this.infoList.isFront?'已更改为前置仓':'已更改为经销商自有仓库')
+      })
     }
   }
 }

+ 81 - 8
src/views/basic_data/stock/adjust_warehouse.vue

@@ -1,15 +1,20 @@
 <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>
-    <warehousing-header/>
+    <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>
 
@@ -17,21 +22,40 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 
-import { getFrontListCustomerAcc, exportCustomerStockOrderBean } from '@/api/stock'
-import WarehousingHeader from '@/components/WarehousingHeader/WarehousingHeader'
+import { getFrontListCustomerAcc, exportCustomerStockOrderBean, deleteCustomerStockOrder } from '@/api/stock'
+import WarehouseForm from '@/views/basic_data/stock/components/WarehouseForm'
+import WarehouseExamine from '@/views/basic_data/stock/components/WarehouseExamine'
+import WarehouseDetails from '@/views/basic_data/stock/components/WarehouseDetails'
+
 export default {
-  components: { TemplatePage,WarehousingHeader },
+  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.dels,
-              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+              name: '库存调整',
+              click: this.addWarehouse
+              // isRole: this.$checkBtnRole('add', this.$route.meta.roles)
             }
           ]
         ]
@@ -45,7 +69,8 @@ export default {
       tableEvents: {
         'selection-change': this.selectionChange
       },
-      recordSelected: []
+      recordSelected: [],
+      detailsId: ''
     }
   },
   methods: {
@@ -63,6 +88,54 @@ export default {
     // 监听勾选变化
     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-button
+              size="mini"
+              type="text" onClick={() => {
+              deleteCustomerStockOrder({ id: row.id }).then(res => {
+                this.$successMsg('删除成功')
+                this.$refs.pageRef.getTableData()
+              })
+            }}
+            >
+              删除
+            </el-button>
+          </div>
+        )
+      }
+
     }
     // 批量删除
     // dels() {

+ 115 - 0
src/views/basic_data/stock/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/basic_data/stock/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/basic_data/stock/components/WarehouseForm.vue

@@ -0,0 +1,153 @@
+<template>
+  <div>
+    <el-page-header @back="$parent.pageType=0" content="新增" 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/basic_data/stock/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>

+ 141 - 2
src/views/sales/sales_management/components/customer_sales_details.vue

@@ -1,10 +1,149 @@
 <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" 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 SalesHeader from '@/components/SalesHeader/SalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import {  addFrontOrder } from '@/api/sales'
+import {  getcustomerFrontList } from '@/api/stock'
+
 export default {
-  name: 'customer_sales_details'
+  name: 'WarehouseForm',
+  components: {
+    SalesHeader,
+    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>
 

+ 141 - 2
src/views/sales/sales_management/components/customer_sales_form.vue

@@ -1,10 +1,149 @@
 <template>
-  <div></div>
+  <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" 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 SalesHeader from '@/components/SalesHeader/SalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import {  addFrontOrder } from '@/api/sales'
+import {  getcustomerFrontList } from '@/api/stock'
+
 export default {
-  name: 'CustomerSalesForm'
+  name: 'WarehouseForm',
+  components: {
+    SalesHeader,
+    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>
 

+ 141 - 2
src/views/sales/sales_management/components/return_sales_details.vue

@@ -1,10 +1,149 @@
 <template>
-    <div></div>
+  <div>
+    <el-page-header @back="$parent.pageType=0" content="详情" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <return-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>
+          <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 ReturnSalesHeader from '@/components/ReturnSalesHeader/ReturnSalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import {  addFrontOrder } from '@/api/sales'
+import {  getcustomerFrontList } from '@/api/stock'
+
 export default {
-  name: 'ReturnSalesDetails'
+  name: 'WarehouseForm',
+  components: {
+    ReturnSalesHeader,
+    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>
 

+ 139 - 2
src/views/sales/sales_management/components/return_sales_form.vue

@@ -1,12 +1,149 @@
 <template>
   <div>
-
+    <el-page-header @back="$parent.pageType=0" content="新增" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <return-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>
+          <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 ReturnSalesHeader from '@/components/ReturnSalesHeader/ReturnSalesHeader'
+import SalesTable from '@/components/SalesTable/SalesTable'
+import {  addFrontOrder } from '@/api/sales'
+import {  getcustomerFrontList } from '@/api/stock'
+
 export default {
-  name: 'ReturnSalesForm'
+  name: 'WarehouseForm',
+  components: {
+    ReturnSalesHeader,
+    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>
 

+ 33 - 8
src/views/sales/sales_management/customer_sales_list.vue

@@ -1,35 +1,60 @@
 <template>
   <div>
     <template-page
+      v-if="!pageType"
       style="width: 100%;
       height: 100%;"
       ref="pageRef"
       :getList="getList"
       :exportList="exportList"
       :columnParsing="columnParsing"
+      :optionsEvensGroup="optionsEvensGroup"
     >
     </template-page>
+    <customer_sales_form v-if="pageType===1" />
+    <customer_sales_details v-else/>
   </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'
+import { 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'
 export default {
-  components: { TemplatePage },
+  components: { TemplatePage, customer_sales_form,customer_sales_details },
   mixins: [import_mixin],
   data() {
     return {
+      pageType: 2,
       // 事件组合
       optionsEvensGroup: [
         [
           [
             {
-              name: '批量删除',
-              click: this.dels,
-              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+              name: '新增',
+              click: ()=>{
+                this.pageType = 1
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '编辑',
+              click: ()=>{
+                this.pageType = 1
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '删除',
+              click: this.dels
             }
           ]
         ]
@@ -50,10 +75,10 @@ export default {
     // 列表请求函数
     getList(...p) {
       this.recordSelected = []
-      return getcustomerFrontList(...p)
+      return getFrontOrderList(...p)
     },
     // 列表导出函数
-    exportList: partsNewInExport,
+    exportList: exportCustomerFrontOrder,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData

+ 33 - 8
src/views/sales/sales_management/return_sales_list.vue

@@ -1,35 +1,60 @@
 <template>
   <div>
     <template-page
+      v-if="!pageType"
       style="width: 100%;
       height: 100%;"
       ref="pageRef"
       :getList="getList"
       :exportList="exportList"
       :columnParsing="columnParsing"
+      :optionsEvensGroup="optionsEvensGroup"
     >
     </template-page>
+    <return_sales_form v-if="pageType===1"/>
+    <return_sales_details v-else/>
   </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'
+import { 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'
 export default {
-  components: { TemplatePage },
+  components: { TemplatePage,return_sales_form,return_sales_details },
   mixins: [import_mixin],
   data() {
     return {
+      pageType:1,
       // 事件组合
       optionsEvensGroup: [
         [
           [
             {
-              name: '批量删除',
-              click: this.dels,
-              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+              name: '新增',
+              click: ()=>{
+                this.pageType = 1
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '编辑',
+              click: ()=>{
+                this.pageType = 1
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '删除',
+              click: this.dels
             }
           ]
         ]
@@ -50,10 +75,10 @@ export default {
     // 列表请求函数
     getList(...p) {
       this.recordSelected = []
-      return getcustomerFrontList(...p)
+      return getFrontOrderListRefund(...p)
     },
     // 列表导出函数
-    exportList: partsNewInExport,
+    exportList: exportRefund,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData

+ 10 - 1
src/views/sales_policy/components/AddPolicy.vue

@@ -244,7 +244,16 @@
             </pl-table-column>
             <pl-table-column prop="priceType" label="价格类型" align="left" min-width="150">
               <template slot-scope="scope">
-                {{ scope.row.priceType }}
+                <template v-if="scope.row.fang">
+                  {{ scope.row.priceType }}
+                </template>
+                <el-input
+                  v-else
+                  v-model="scope.row.priceType"
+                  placeholder="价格类型"
+                  size="mini"
+                  @change="setText($event, scope.$index, scope.row, 'priceType')"
+                />
               </template>
             </pl-table-column>
             <pl-table-column prop="price" label="单价" align="right" show-overflow-tooltip min-width="150">

+ 10 - 1
src/views/sales_policy/components/editPolicy.vue

@@ -246,7 +246,16 @@
               </pl-table-column>
               <pl-table-column prop="priceType" label="价格类型" align="left" min-width="150">
                 <template slot-scope="scope">
-                  {{ scope.row.priceType }}
+                  <template v-if="scope.row.fang">
+                    {{ scope.row.priceType }}
+                  </template>
+                  <el-input
+                    v-else
+                    v-model="scope.row.priceType"
+                    placeholder="价格类型"
+                    size="mini"
+                    @change="setText($event, scope.$index, scope.row, 'priceType')"
+                  />
                 </template>
               </pl-table-column>
               <pl-table-column prop="price" label="单价" align="right" show-overflow-tooltip min-width="150">

+ 25 - 42
src/views/supply/apply/apply_list.vue

@@ -7,12 +7,10 @@
           <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">
-                <el-radio-button v-if="index !== 3" :key="index" :label="item.value">{{
-                    item.label
-                  }}
-                </el-radio-button>
-              </template>
+              <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
+                  item.label
+                }}
+              </el-radio-button>
             </el-radio-group>
           </template>
           <template #right_btn>
@@ -384,13 +382,8 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    (( !isCustomer && !scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL'))||(isCustomer && !scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') && scope.row.type!=2) || (
-                    !isCustomer  &&  scope.row.automaticStatus &&
-                     (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') &&
-                     scope.row.type===2
-                    ) )
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'SAVE'
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -401,10 +394,8 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT') ||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT' && scope.row.type!=2)||( !isCustomer  && scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT'&& scope.row.type==2))
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT'
                   "
                   style="margin-right: 10px"
                   title="确定撤回吗?"
@@ -415,10 +406,8 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK')||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK' && scope.row.type!=2)||( !isCustomer && scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK' && scope.row.type==2))
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK'
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"
@@ -440,15 +429,14 @@
                 </el-button>
                 <el-button
                   v-if="
-                    $checkBtnRole('edit', $route.meta.roles) &&
-                      ((!isCustomer && !scope.row.automaticStatus &&
+                    ($checkBtnRole('edit', $route.meta.roles) &&
+                      !scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2)||(isCustomer && !scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') && scope.row.type!=2 && scope.row.type !==1)  ||
-                      ( !isCustomer && scope.row.automaticStatus &&
-                     (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                     scope.row.type===2)
-                      )
+                      scope.row.type === 2) ||
+                    ($checkBtnRole('edit', $route.meta.roles) &&
+                      scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE' &&
+                      scope.row.type == 2)
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"
@@ -458,23 +446,20 @@
                 <el-button
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT') ||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus !== 'WAIT' && scope.row.type!=2) || (!isCustomer && scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT' && scope.row.type==2))
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT'
                   "
                   type="text"
                   @click="toExamine(scope.row)"
                 >
-                  审
+                  审
                 </el-button>
                 <el-button type="text" @click="toDetail(scope.row)"> 详情</el-button>
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('del', $route.meta.roles) &&
-                    ((!isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus !== 'OK' ) ||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus !== 'OK' && scope.row.type!=2)   || ( !isCustomer &&scope.row.automaticStatus && scope.row.examineStatus !== 'OK' && scope.row.type==2 ) )
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK'
                   "
                   style="margin-left: 10px"
                   title="确定删除吗?"
@@ -569,7 +554,7 @@ export default {
         { label: '已保存', value: 'SAVE' },
         { label: '待审核', value: 'WAIT' },
         { label: '审核通过', value: 'OK' },
-        { label: '审核驳回', value: 'FAIL' },
+        //  // { label: '审核驳回', value: 'FAIL' },,
         { label: '已关闭', value: 'CLOSE' }
       ],
       orderTypeList: [
@@ -592,9 +577,7 @@ export default {
         status: '',
         remark: ''
       },
-      categoryList: [],
-      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer
-
+      categoryList: []
     }
   },
 
@@ -820,7 +803,7 @@ export default {
       ids = Array.from(new Set(ids))
       examineBatchApply({
         ids: ids.join(','),
-        examineStatus: this.examineForm.status === 'FAIL' ? 'SAVE' : 'OK',
+        examineStatus: this.examineForm.status,
         approvalRemark: this.examineForm.remark
       }).then(res => {
         this.isShowExamineDialog = false

+ 31 - 55
src/views/supply/apply/engin_list.vue

@@ -3,17 +3,13 @@
     <div v-show="!isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm">
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <Collapse :screen-form="screenForm">
+        <Collapse   :screen-form="screenForm">
           <template #left_btn>
             <el-radio-group size="mini" v-model="screenForm.status" @change="getList()">
               <el-radio-button label="">全部</el-radio-button>
-              <template v-for="(item, index) in statusList" >
-                <el-radio-button v-if="index !== 3" :key="index" :label="item.value">{{
-                    item.label
-                  }}
-                </el-radio-button>
-              </template>
-
+              <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
+                  item.label
+                }}</el-radio-button>
             </el-radio-group>
           </template>
           <template #right_btn>
@@ -175,8 +171,7 @@
               type="primary"
               icon="el-icon-plus"
               @click="toForm()"
-            >发货申请
-            </el-button
+            >发货申请</el-button
             >
             <el-button
               v-if="$checkBtnRole('refund', $route.meta.roles)"
@@ -184,8 +179,7 @@
               type="primary"
               icon="el-icon-plus"
               @click="toReturnForm()"
-            >退货申请
-            </el-button
+            >退货申请</el-button
             >
             <el-button
               v-if="$checkBtnRole('examine', $route.meta.roles)"
@@ -194,8 +188,7 @@
               icon="el-icon-finished"
               :disabled="multipleSelection.length < 1"
               @click="batchExamine"
-            >批量审批
-            </el-button
+            >批量审批</el-button
             >
           </div>
           <div class="fr">
@@ -413,14 +406,9 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL'))||(isCustomer && !scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') && scope.row.type!=2)  || (
-                     !isCustomer  && scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') &&
-                     scope.row.type===2
-                    ) )
+                    scope.row.examineStatus === 'SAVE'
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -430,11 +418,9 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                  $checkBtnRole('apply', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT') ||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT' && scope.row.type!=2) ||(!isCustomer  && scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT'&& scope.row.type==2))
+                    !scope.row.automaticStatus &&
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    scope.row.examineStatus === 'WAIT'
                   "
                   style="margin-right: 10px"
                   title="确定撤回吗?"
@@ -444,11 +430,9 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK')||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK' && scope.row.type!=2) ||( !isCustomer  && scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK' && scope.row.type==2))
+                    scope.row.examineStatus === 'OK'
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"
@@ -458,7 +442,7 @@
                 </el-popconfirm>
                 <el-button
                   v-if="
-                     !scope.row.automaticStatus &&
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('edit', $route.meta.roles) &&
                     (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 1
@@ -470,14 +454,14 @@
                 </el-button>
                 <el-button
                   v-if="
-                  $checkBtnRole('edit', $route.meta.roles) &&
-                    (( !isCustomer &&!scope.row.automaticStatus &&
+                    (!scope.row.automaticStatus &&
+                      $checkBtnRole('edit', $route.meta.roles) &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2 )||(isCustomer && !scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') && scope.row.type!=2 && scope.type!==1) ||
-                       (!isCustomer  &&scope.row.automaticStatus &&
-                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                     scope.row.type===2))
+                      scope.row.type === 2) ||
+                    ($checkBtnRole('edit', $route.meta.roles) &&
+                      scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE' &&
+                      scope.row.type == 2)
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"
@@ -486,24 +470,19 @@
                 </el-button>
                 <el-button
                   v-if="
+                    !scope.row.automaticStatus &&
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT')||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT' && scope.row.type!=2)|| ( !isCustomer  &&scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT' && scope.row.type==2))
+                    scope.row.examineStatus === 'WAIT'
                   "
                   type="text"
                   @click="toExamine(scope.row)"
                 >
-                  审
+                  审
                 </el-button>
-                <el-button type="text" @click="toDetail(scope.row)"> 详情</el-button>
+                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
-                  v-if="  $checkBtnRole('del', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus !== 'OK')||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK' && scope.row.type!=2) || ( !isCustomer  && scope.row.automaticStatus && scope.row.examineStatus !== 'OK' && scope.row.type==2 ) )"
+                  v-if="!scope.row.automaticStatus && scope.row.examineStatus !== 'OK'"
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"
@@ -599,7 +578,7 @@ export default {
         { label: '已保存', value: 'SAVE' },
         { label: '待审核', value: 'WAIT' },
         { label: '审核通过', value: 'OK' },
-        { label: '审核驳回', value: 'FAIL' },
+        //  // { label: '审核驳回', value: 'FAIL' },,
         { label: '已关闭', value: 'CLOSE' }
       ],
       orderTypeList: [
@@ -623,9 +602,7 @@ export default {
         remark: ''
       },
       isShow: false,
-      categoryList: [],
-      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer,
-
+      categoryList: []
     }
   },
 
@@ -851,10 +828,9 @@ export default {
         return item.id
       })
       ids = Array.from(new Set(ids))
-
       examineBatchEngin({
         ids: ids.join(','),
-        examineStatus: this.examineForm.status === 'FAIL' ? 'SAVE' : 'OK',
+        examineStatus: this.examineForm.status,
         approvalRemark: this.examineForm.remark
       }).then(res => {
         this.isShowExamineDialog = false
@@ -878,7 +854,7 @@ export default {
      * @param {String} index - 索引值
      * @return Boolean
      */
-    selectable: function(row, index) {
+    selectable: function (row, index) {
       if (row.automaticStatus) {
         return false
       }

+ 44 - 14
src/views/supply/pickup/components/pickup_form.vue

@@ -56,9 +56,10 @@
           <el-col :xs="24" :sm="12" :lg="8">
             <el-form-item label="提货方式" prop="pickupWay">
               <el-radio-group v-model="mainForm.pickupWay" :disabled="flag">
-                <el-radio :label="item.dictCode" v-for="(item, index) in pickupWayList" :key="index">{{
-                  item.dictValue
-                }}</el-radio>
+                <el-radio :label="item.dictCode" :disabled="(isFront ===true && item.dictCode=='1' )||(isFront===false && item.dictCode=='2' )  " v-for="(item, index) in pickupWayList" :key="index">{{
+                    item.dictValue
+                  }}
+                </el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -98,6 +99,7 @@
                 <el-option
                   :label="item.logisticsCompany"
                   :value="item.id"
+                  :disabled="isFront ===false && item.id === '1574563841707114498'"
                   v-for="(item, index) in companyList"
                   :key="index"
                 ></el-option>
@@ -213,13 +215,13 @@
                 "
               />
               <span>{{
-                scope.row.orderType === 'TRADE' ||
-                scope.row.orderType === 'HOME' ||
-                scope.row.orderType === 'REQUISITION_TRADE' ||
-                scope.row.orderType === 'REQUISITION_HOME'
-                  ? scope.row.enginOrderNo
-                  : scope.row.mainOrderId
-              }}</span>
+                  scope.row.orderType === 'TRADE' ||
+                  scope.row.orderType === 'HOME' ||
+                  scope.row.orderType === 'REQUISITION_TRADE' ||
+                  scope.row.orderType === 'REQUISITION_HOME'
+                    ? scope.row.enginOrderNo
+                    : scope.row.mainOrderId
+                }}</span>
             </template>
           </el-table-column>
           <!-- <el-table-column align="left" label="工程编号" prop="enginOrderNo" min-width="140" show-overflow-tooltip></el-table-column> -->
@@ -272,8 +274,9 @@
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm" v-if="!flag" :loading="formLoading">{{
-          formLoading ? '提交中 ...' : '提 交'
-        }}</el-button>
+            formLoading ? '提交中 ...' : '提 交'
+          }}
+        </el-button>
         <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px" v-if="!listItem">
           <el-button slot="reference">重 置</el-button>
         </el-popconfirm>
@@ -335,7 +338,8 @@ export default {
       pickupManList: [],
       pickupCarList: [],
       companyList: [],
-      logisticsNumber: ''
+      logisticsNumber: '',
+      isFront: JSON.parse(localStorage.getItem('supply_user')).isFront
     }
   },
 
@@ -360,6 +364,7 @@ export default {
     if (this.listItem) {
       this.getDetail()
     }
+
   },
 
   methods: {
@@ -429,6 +434,29 @@ export default {
     getPickupWayList() {
       getDictList({ sysDictEnum: 'PICK' }).then(res => {
         this.pickupWayList = res.data
+        if (this.isFront) {
+          this.mainForm.pickupWay = '2'
+          this.mainForm.logisticsId = '1574563841707114498'
+          getCompanyList({
+            pageNum: 1,
+            pageSize: -1
+          }).then(res => {
+            this.companyList = res.data.records
+            const item = this.companyList.find(k => k.id === this.mainForm.logisticsId)
+            this.mainForm.company = item.logisticsCompany
+            this.logisticsNumber = item.logisticsNumber
+            if (this.logisticsNumber === '001' && this.deliverList && this.deliverList.length) {
+              this.deliverList.forEach(k => {
+                this.$set(k, 'receivingName', '')
+                this.$set(k, 'phone', '')
+                this.$set(k, 'address', '')
+              })
+            }
+          })
+        }else {
+          this.mainForm.pickupWay = '1'
+
+        }
       })
     },
 
@@ -439,6 +467,7 @@ export default {
         pageSize: -1
       }).then(res => {
         this.pickupManList = res.data.records
+
       })
     },
 
@@ -535,7 +564,8 @@ export default {
                 .then(() => {
                   this.submitForm()
                 })
-                .catch(() => {})
+                .catch(() => {
+                })
             } else {
               this.submitForm()
             }