소스 검색

Merge branch 'dev_v2' of ssh://gogs.zfire.top:2222/zfire-front/supply-front into dev_v2

aXin-0810 2 년 전
부모
커밋
3dfbd44d3f

+ 19 - 1
src/api/basic_data/logistics.js

@@ -1,4 +1,22 @@
-import request from '@/utils/request'
+import request, { postBlob, handleImport, getBlob } from '@/utils/request'
+export function getLogisticsV2(params) {
+  return request({
+    url: `/logistics/listV2?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+export function exportLogisticsV2(data, name) {
+  return postBlob({
+    url: '/logistics/listV2/export',
+    data,
+    name
+  })
+}
+
+
+
+
 var qs = require('qs')
 export function getList(params) {
   return request({

+ 31 - 0
src/api/stock.js

@@ -31,6 +31,37 @@ export function exportListStockToDayCustomerV2(data, name) {
   })
 }
 
+export function getStockListV2(params) {
+  return request({
+    url: `/stock/manager/listV2?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+export function exportStockListV2(data, name) {
+  return postBlob({
+    url: '/stock/manager/listV2/export',
+    data,
+    name
+  })
+}
+
+export function getStockManagerListV2(params) {
+  return request({
+    url: `/stock/manager/listCustomerV2?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+export function exportStockManagerListV2(data, name) {
+  return postBlob({
+    url: '/stock/manager/listCustomerV2/export',
+    data,
+    name
+  })
+}
 
 
 // 获取库存列表

+ 15 - 2
src/api/supply/allot.js

@@ -1,5 +1,18 @@
-import request from '@/utils/request'
-
+import request, { postBlob, handleImport, getBlob } from '@/utils/request'
+export function getTransferV2(params) {
+  return request({
+    url: `/v2/transfer/list?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+export function exportTransferV2(data, name) {
+  return postBlob({
+    url: '/v2/transfer/list/export',
+    data,
+    name
+  })
+}
 // 获取列表
 export function getList(params) {
   return request({

+ 29 - 0
src/api/supply/purchase.js

@@ -72,6 +72,35 @@ export function exportPlanListV2(data, name) {
     name
   })
 }
+export function getPurchaseOrderListV2(params) {
+  return request({
+    url: `/v2/purchaseOrder/list?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+export function exportPurchaseOrderV2(data, name) {
+  return postBlob({
+    url: '/v2/purchaseOrder/list/export',
+    data,
+    name
+  })
+}
+
+export function getPurchaseStockInListV2(params) {
+  return request({
+    url: `/v2/purchaseStockIn/list?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+export function exportPurchaseStockInV2(data, name) {
+  return postBlob({
+    url: '/v2/purchaseStockIn/list/export',
+    data,
+    name
+  })
+}
 
 
 // 获取采购单列表

+ 2 - 2
src/views/basic_data/dealer/dealer_stock.vue

@@ -123,10 +123,10 @@ export default {
                   this.$message.error('请选择需要删除的数据')
                   return
                 }
-                let dis = this.recordSelected.map(v => {
+                let ids = this.recordSelected.map(v => {
                   return v.id
                 })
-                let params = {ids:dis.toString()}
+                let params = {ids:ids.toString()}
                 await deleDealerStockList(params)
                 this.$refs.pageRef.refreshList()
                 this.$message.success('批量删除成功')

+ 136 - 216
src/views/basic_data/logistics/logistics_list.vue

@@ -1,163 +1,14 @@
 <template>
-  <div class="app-container">
-    <!-- 筛选条件 -->
-    <div>
-      <Collapse :screen-form="screenForm">
-        <template #right_btn>
-          <el-button size="mini" @click="resetScreenForm">清空</el-button>
-          <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-        </template>
-        <template #search>
-          <el-form ref="screenForm" :model="screenForm" label-width="120px" size="mini" label-position="left">
-            <el-row :gutter="20">
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="物流公司名称" prop="customerTel">
-                  <el-input placeholder="请输入物流公司名称" v-model="screenForm.logisticsCompany"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="客服电话" prop="logisticsCompany">
-                  <el-input placeholder="请输入客服电话" v-model="screenForm.customerTel"></el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        </template>
-      </Collapse>
-    </div>
-    <!-- 按钮 -->
-    <div class="btn-group clearfix">
-      <div class="fl">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="hanleAdd"
-          v-if="$checkBtnRole('add', $route.meta.roles)"
-          >新增</el-button
-        >
-        <el-popconfirm
-          v-if="$checkBtnRole('del', $route.meta.roles)"
-          confirm-button-text="好的"
-          cancel-button-text="不用了"
-          icon="el-icon-info"
-          icon-color="red"
-          title="内容确定删除吗?"
-          @onConfirm="hanleDelete"
-        >
-          <el-button type="primary" size="mini" slot="reference" class="el-popover-left">删除</el-button>
-        </el-popconfirm>
-      </div>
-      <div class="fr">
-        <!-- <ExportButton :exUrl="'/logistics/export'" :exParams="exParams" /> -->
-
-        <el-button type="primary" size="mini" @click="handleExport">导出</el-button>
-        <!-- <el-button type="primary" size="mini" @click="hanlePrint"
-          >打印</el-button
-        > -->
-      </div>
-    </div>
-    <!-- 列表 -->
-    <div class="mymain-container">
-      <div class="table">
-        <el-table
-          v-loading="listLoading"
-          :data="dataList"
-          element-loading-text="Loading"
-          @select="hanleSelectAll"
-          @select-all="hanleSelectAll"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column type="selection" align="center"></el-table-column>
-          <el-table-column
-            align="center"
-            label="物流公司名称"
-            prop="logisticsCompany"
-            min-width="160"
-            show-overflow-tooltip
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            label="物流公司代码"
-            prop="logisticsNumber"
-            min-width="160"
-            show-overflow-tooltip
-          >
-          </el-table-column>
-          <!-- <el-table-column
-            align="center"
-            label="提货人"
-            prop="pickName"
-            min-width="160"
-            show-overflow-tooltip
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            label="提货人电话"
-            prop="pickTel"
-            min-width="160"
-            show-overflow-tooltip
-          >
-          </el-table-column> -->
-          <el-table-column align="center" label="客服电话" prop="customerTel" min-width="160" show-overflow-tooltip>
-          </el-table-column>
-          <el-table-column align="center" label="创建人" prop="createBy" min-width="160" show-overflow-tooltip>
-          </el-table-column>
-          <el-table-column align="center" label="创建时间" prop="createTime" min-width="160" show-overflow-tooltip>
-          </el-table-column>
-          <el-table-column align="center" label="更新人" prop="updateBy" min-width="160" show-overflow-tooltip>
-          </el-table-column>
-          <el-table-column align="center" label="更新时间" prop="updateTime" min-width="160" show-overflow-tooltip>
-          </el-table-column>
-          <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <!-- <el-button
-                type="text"
-                class="textColor"
-                @click="hanleDetail(scope.row)"
-                >详情</el-button
-              > -->
-              <el-button
-                type="text"
-                v-if="$checkBtnRole('edit', $route.meta.roles)"
-                class="textColor"
-                @click="editFn(scope.row.id, scope.row)"
-                >编辑</el-button
-              >
-              <el-popconfirm
-                v-if="$checkBtnRole('del', $route.meta.roles)"
-                confirm-button-text="好的"
-                cancel-button-text="不用了"
-                icon="el-icon-info"
-                icon-color="red"
-                title="内容确定删除吗?"
-                @onConfirm="hanleDelete(scope.row.id)"
-              >
-                <el-button slot="reference" type="text" class="textColor el-popover-left">删除</el-button>
-              </el-popconfirm>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <!-- 分页 -->
-      <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
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :operation="operation()"
+    :tableAttributes="tableAttributes"
+    :tableEvents="tableEvents"
+    :optionsEvensGroup="optionsEvensGroup"
+    :columnParsing="columnParsing"
+  >
     <!-- 弹窗 -->
     <el-dialog
       title="物流公司"
@@ -166,7 +17,7 @@
       :show-close="false"
       :close-on-click-modal="false"
     >
-      <el-form ref="form" :rules="type == 2 ? rules : ''" :model="diaLogForm" label-width="120px">
+      <el-form ref="form" :rules="rules" :model="diaLogForm" label-width="120px">
         <el-form-item label="物流公司名称" prop="logisticsCompany">
           <el-input v-model="diaLogForm.logisticsCompany"></el-input>
         </el-form-item>
@@ -184,22 +35,79 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="hanleCancel('form')">取 消</el-button>
+        <el-button @click="handleClose('form')">取 消</el-button>
         <el-button type="primary" @click="handelInfo('form')">确 定</el-button>
       </div>
     </el-dialog>
-  </div>
+  </template-page>
 </template>
 
 <script>
-import Mixin from '@/mixin/index'
-import { addInof, deleteInfo, getLogisticsList, updateInfo } from '@/api/basic_data/logistics'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import {
+  addInof,
+  deleteInfo,
+  getLogisticsList,
+  updateInfo,
+  getLogisticsV2,
+  exportLogisticsV2
+} from '@/api/basic_data/logistics'
 import { downloadFiles } from '@/utils/util'
-
 export default {
-  mixins: [Mixin],
+  components: { TemplatePage, Popu },
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '新增',
+              click: this.addOn(() => {
+                this.hanleAdd()
+              }),
+              isRole: this.$checkBtnRole('add', this.$route.meta.roles)
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '批量删除',
+              click: async () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.error('请选择需要删除的数据')
+                  return
+                }
+                let ids = this.recordSelected.map(v => {
+                  return v.id
+                })
+                let params = ids
+                await deleteInfo(params)
+                this.$refs.pageRef.refreshList()
+                this.$message.success('批量删除成功')
+              },
+              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+            }
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
       type: 1, // 1 ,2, 3
       diaLogForm: {
         id: null,
@@ -221,20 +129,60 @@ export default {
       rules: {
         logisticsCompany: [{ required: true, message: '请输入物流公司名称', trigger: 'blur' }],
         logisticsNumber: [{ required: true, message: '请输入物流公司代码', trigger: 'blur' }]
-        // pickName: [
-        //   { required: true, message: "请输入提货人", trigger: "blur" },
-        // ],
-        // pickTel: [
-        //   { required: true, message: "请输入提货人电话", trigger: "blur" },
-        // ],
-        // customerTel: [
-        //   { required: true, message: "请输入客服电话", trigger: "blur" },
-        // ],
-      },
-      isCollapse: true
+      }
     }
   },
   methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getLogisticsV2(...p)
+    },
+    // 列表导出函数
+    exportList: exportLogisticsV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            {this.$checkBtnRole('edit', this.$route.meta.roles) ? (
+              <el-button type="text" class="textColor" onClick={() => this.editFn(row.id, row)}>
+                编辑
+              </el-button>
+            ) : null}
+            {this.$checkBtnRole('del', this.$route.meta.roles) ? (
+              <el-popconfirm
+                confirm-button-text="好的"
+                cancel-button-text="不用了"
+                icon="el-icon-info"
+                icon-color="red"
+                title="内容确定删除吗?"
+                onOnConfirm={() => this.hanleDelete(row.id)}
+              >
+                <el-button slot="reference" type="text" class="textColor el-popover-left">
+                  删除
+                </el-button>
+              </el-popconfirm>
+            ) : null}
+          </div>
+        )
+      }
+    },
+    handleClose() {
+      this.$refs['form'].resetFields()
+
+      this.addOff(() => {
+        this.type = 2
+        this.showDialogForm = false
+      })()
+    },
     //显示新增弹框
     hanleAdd() {
       this.type = 2
@@ -253,24 +201,10 @@ export default {
       }
       this.showDialogForm = true
     },
-    // 初始化数据
-    getList() {
-      this.listLoading = true
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        customerTel: this.screenForm.customerTel,
-        logisticsCompany: this.screenForm.logisticsCompany
-      }
-      getLogisticsList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-        console.log(this.dataList, 1233)
-      })
-    },
+
     //新增数据或者编辑数据请求接口  type 1 为编辑  type 2 新增
     handelInfo(formName) {
+      console.log(this.type, '999')
       if (this.type === 1) {
         const params = {
           ...this.diaLogForm
@@ -278,8 +212,8 @@ export default {
         updateInfo(params).then(res => {
           this.$successMsg('编辑成功')
           this.showDialogForm = false
-          this.getList()
-          this.hanleCancel()
+          this.$refs.pageRef.refreshList()
+          this.handleClose()
         })
         this.diaLogForm.id = null
       } else if (this.type === 2) {
@@ -288,8 +222,8 @@ export default {
             addInof(this.diaLogForm).then(res => {
               this.$successMsg('保存成功')
               this.showDialogForm = false
-              this.hanleCancel()
-              this.getList()
+              this.handleClose()
+              this.$refs.pageRef.refreshList()
             })
           } else {
             console.log('error submit!!')
@@ -305,7 +239,7 @@ export default {
       this.type = 3
       this.showDialogForm = true
       this.diaLogForm = detail
-      this.hanleCancel()
+      this.handleClose()
     },
     // 导出文档
     handleExport() {
@@ -318,29 +252,15 @@ export default {
 
     // 删除数据
     hanleDelete(id) {
-      this.hanleDeleteAllPromise(id).then(ids => {
-        deleteInfo(ids).then(() => {
-          this.$successMsg('删除成功')
-          this.getList()
-        })
+      deleteInfo([id]).then(() => {
+        this.$successMsg('删除成功')
+        this.$refs.pageRef.refreshList()
       })
-    },
-    // 取消按钮重置数据
-    hanleCancel(form) {
-      this.$refs['form'].resetFields()
-      // this.diaLogForm = {
-      //   id: null,
-      //   customerTel: "",
-      //   logisticsCompany: "",
-      //   logisticsNumber: "",
-      //   pickName: "",
-      //   pickTel: "",
-      // };
-      this.showDialogForm = false
     }
   }
 }
 </script>
+
 <style lang="scss" scoped>
 .textColor {
   color: black;

+ 16 - 13
src/views/sales_policy/components/Examine.vue

@@ -12,9 +12,16 @@
               <div class="value">{{ detail.code }}</div>
             </el-col>
             <el-col :span="8" class="item">
-              <div class="label">销售政策名称</div>
+              <div class="label">销售政策类型</div>
               <div class="value">
-                <el-input v-model="detail.title" placeholder="请输入政策名称" />
+                <el-select v-model="detail.type" size="small" disabled placeholder="销售政策类型" class="select_height">
+                  <el-option
+                    v-for="(item, index) in typeOptions"
+                    :key="index"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
               </div>
             </el-col>
             <el-col :span="8" class="item">
@@ -23,24 +30,17 @@
                 {{ detail.status == 1 ? '已生效' : '未生效' }}
               </div>
             </el-col>
+       
             <el-col :span="24" class="item">
-              <div class="label">销售政策类型</div>
+              <div class="label">销售政策名称</div>
               <div class="value">
-                <el-select v-model="detail.type" size="small" placeholder="销售政策类型" class="select_height">
-                  <el-option
-                    v-for="(item, index) in typeOptions"
-                    :key="index"
-                    :label="item.label"
-                    :value="item.value"
-                  />
-                </el-select>
+                <el-input v-model="detail.title" disabled placeholder="请输入政策名称" />
               </div>
             </el-col>
-
             <el-col :span="24" class="item">
               <div class="label">表头备注</div>
               <div class="value">
-                <el-input v-model="detail.remark" placeholder="请输入表头备注" />
+                <el-input v-model="detail.remark" disabled placeholder="请输入表头备注" />
               </div>
             </el-col>
 
@@ -53,6 +53,7 @@
               <div class="value">
                 <el-date-picker
                   v-model="detail.createTime"
+                  disabled
                   type="datetime"
                   placeholder="制单日期"
                   default-time="00:00:00"
@@ -65,6 +66,7 @@
               <div class="value">
                 <el-date-picker
                   v-model="detail.startTime"
+                  disabled
                   type="datetime"
                   placeholder="生效日期"
                   default-time="00:00:00"
@@ -77,6 +79,7 @@
               <div class="value">
                 <el-date-picker
                   v-model="detail.endTime"
+                  disabled
                   type="datetime"
                   placeholder="生效日期"
                   default-time="00:00:00"

+ 5 - 18
src/views/sales_policy/components/details.vue

@@ -12,9 +12,9 @@
               <div class="value">{{ detail.code }}</div>
             </el-col>
             <el-col :span="8" class="item">
-              <div class="label">销售政策名称</div>
+              <div class="label">销售政策类型</div>
               <div class="value">
-                <el-input v-model="detail.title" placeholder="请输入销售政策名称" />
+                {{ detail.type == 'PROVISION' ? '配提' : '限量' }}
               </div>
             </el-col>
             <el-col :span="8" class="item">
@@ -24,25 +24,12 @@
               </div>
             </el-col>
             <el-col :span="24" class="item">
-              <div class="label">销售政策类型</div>
+              <div class="label">销售政策名称</div>
               <div class="value">
-                {{ detail.type == 'PROVISION' ? '配提' : '限量' }}
-                <!-- <el-select value: 'PROVISION',
-          label: '配提'
-                  v-model="detail.type"
-                  size="mini"
-                  placeholder="销售政策类型"
-                  class="select_height"
-                >
-                  <el-option
-                    v-for="(item, index) in typeOptions"
-                    :key="index"
-                    :label="item.label"
-                    :value="item.value"
-                  />
-                </el-select> -->
+                <el-input v-model="detail.title" disabled placeholder="请输入销售政策名称" />
               </div>
             </el-col>
+        
 
             <el-col :span="24" class="item">
               <div class="label">表头备注</div>

+ 64 - 221
src/views/stock/reserved_stock.vue

@@ -1,159 +1,43 @@
 <template>
-  <div class="app-container">
-    <!-- 筛选条件 -->
-    <div class="screen-container">
-      <Collapse :screen-form="screenForm">
-        <template #right_btn>
-          <el-button size="mini" @click="resetScreenForm">清空</el-button>
-          <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-        </template>
-        <template #search>
-          <el-form ref="screenForm" :model="screenForm" label-width="90px" size="mini" label-position="left">
-            <el-row :gutter="20">
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="产品大类" prop="type">
-                  <el-select v-model="screenForm.type" placeholder="请选择产品大类" clearable>
-                    <el-option
-                      v-for="item in typeList"
-                      :key="item.dictCode"
-                      :label="item.dictValue"
-                      :value="item.dictCode"
-                    ></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="产品名称" prop="goodsName">
-                  <el-input v-model="screenForm.goodsName" placeholder="请输入产品名称"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="产品编码" prop="goodsNum">
-                  <el-input v-model="screenForm.goodsNum" placeholder="请输入产品编码"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="规格型号" prop="model">
-                  <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="经销商编号" prop="jxsNum">
-                  <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编号"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="经销商名称" prop="jxsName">
-                  <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        </template>
-      </Collapse>
-    </div>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :operation="operation()"
+    :optionsEvensGroup="optionsEvensGroup"
+    :columnParsing="columnParsing"
+  >
 
-    <div class="mymain-container">
-      <div class="btn-group clearfix">
-        <div class="fr">
-          <ExportButton :exUrl="'stock/manager/export'" :exParams="exParams" />
-        </div>
-      </div>
-      <div class="table">
-        <el-table
-          v-loading="listLoading"
-          :data="dataList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.customerNumber" />
-              <span>{{ scope.row.customerNumber }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.customerName" />
-              <span>{{ scope.row.customerName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品类别"
-            prop="categoryName"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.materialNumber" />
-              <span>{{ scope.row.materialNumber }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.materialOldNumber" />
-              <span>{{ scope.row.materialOldNumber }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.materialName" />
-              <span>{{ scope.row.materialName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.specification" />
-              <span>{{ scope.row.specification }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="left"
-            label="单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="经销商预留库存"
-            prop="reservedNum"
-            min-width="120"
-            show-overflow-tooltip
-          ></el-table-column>
-          <!-- <el-table-column align="left" label="经销商暂扣库存" prop="temporaryNum" min-width="120" show-overflow-tooltip></el-table-column> -->
-        </el-table>
-      </div>
-    </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>
-  </div>
+  </template-page>
 </template>
 
 <script>
-import { getReservedList } from '@/api/stock'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getStockManagerListV2,exportStockManagerListV2 } from '@/api/stock'
 import { getDictList } from '@/api/common'
-
 export default {
+  components: { TemplatePage, Popu },
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
@@ -169,90 +53,49 @@ export default {
         jxsNum: ''
       },
       typeList: [],
-      isCollapse: true
-    }
-  },
-
-  computed: {
-    exParams() {
-      return {
-        materialName: this.screenForm.goodsName,
-        materialNumber: this.screenForm.goodsNum,
-        specification: this.screenForm.model,
-        mainNumber: this.screenForm.type,
-        customerName: this.screenForm.jxsName,
-        customerNumber: this.screenForm.jxsNum
-      }
     }
   },
-
-  created() {
-    this.getDictList()
-    this.getList()
-  },
-
   methods: {
-    // 查询按钮权限
-    checkBtnRole(value) {
-      // let btnRole = this.$route.meta.roles;
-      // if(!btnRole) {return true}
-      // let index = btnRole.indexOf(value);
-      // return index >= 0;
-      return true
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getStockManagerListV2(...p)
     },
-
-    getDictList() {
-      getDictList({ sysDictEnum: 'PRODUCT_TYPE' }).then(res => {
-        this.typeList = res.data
-      })
+    // 列表导出函数
+    exportList: exportStockManagerListV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
     },
-
-    // 查询列表
-    getList() {
-      this.listLoading = true
-
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        materialName: this.screenForm.goodsName,
-        materialNumber: this.screenForm.goodsNum,
-        specification: this.screenForm.model,
-        mainNumber: this.screenForm.type,
-        customerName: this.screenForm.jxsName,
-        customerNumber: this.screenForm.jxsNum
-      }
-      getReservedList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
     },
-
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1
-      this.getList()
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            {/* <el-button
+              size="mini"
+              type="text"
+              onClick={ () => {
+                this.visible = true
+                this.detailsId = row.id
+              }}
+            >
+              查看
+            </el-button> */}
+          </div>
+        )
+      }
     },
-
-    // 重置筛选表单
-    resetScreenForm() {
-        this.$refs.screenForm.resetFields()
-      this.currentPage = 1
-      this.getList()
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
     },
 
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
 
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    }
   }
 }
 </script>

+ 72 - 316
src/views/stock/stock_list.vue

@@ -1,219 +1,43 @@
 <template>
-  <div class="app-container">
-    <!-- 筛选条件 -->
-    <div class="screen-container">
-      <Collapse :screen-form="screenForm">
-        <template #right_btn>
-          <el-button size="mini" @click="resetScreenForm">清空</el-button>
-          <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-        </template>
-        <template #search>
-          <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
-            <el-row :gutter="20">
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="仓库" prop="warehouse">
-                  <el-select
-                    v-model="screenForm.warehouse"
-                    placeholder="请选择仓库"
-                    @change="changeWarehouse"
-                    clearable
-                    multiple
-                    collapse-tags
-                  >
-                    <el-option
-                      :label="item.name"
-                      :value="item.id"
-                      v-for="(item, index) in warehouseList"
-                      :key="index"
-                    ></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <!-- <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="仓位" prop="position">
-                  <el-select v-model="screenForm.position" placeholder="请选择仓位" clearable>
-                    <el-option :label="item.name" :value="item.id" v-for="(item, index) in positionList" :key="index"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col> -->
-              <!-- <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="产品大类" prop="type">
-                  <el-select v-model="screenForm.type" placeholder="请选择产品大类" @change="changeType" clearable>
-                    <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col> -->
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="产品类别" prop="categoryId">
-                  <el-select
-                    v-model="screenForm.categoryId"
-                    placeholder="请选择产品类别"
-                    filterable
-                    clearable
-                    multiple
-                    collapse-tags
-                  >
-                    <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="物料编码" prop="goodsCode">
-                  <el-input v-model="screenForm.goodsCode" placeholder="请输入物料编码"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="产品编码" prop="goodsNum">
-                  <el-input v-model="screenForm.goodsNum" placeholder="请输入产品编码"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="产品名称" prop="goodsName">
-                  <el-input v-model="screenForm.goodsName" placeholder="请输入产品名称"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="规格型号" prop="model">
-                  <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        </template>
-      </Collapse>
-    </div>
-
-    <div class="mymain-container">
-      <div class="btn-group clearfix">
-        <div class="fr">
-          <ExportButton :exUrl="'stock/manager/export'" :exParams="exParams" />
-        </div>
-      </div>
-      <div class="table">
-        <el-table
-          v-loading="listLoading"
-          :data="dataList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <!-- <el-table-column align="left" label="产品大类" prop="mainName" min-width="100" show-overflow-tooltip></el-table-column> -->
-          <el-table-column
-            align="left"
-            label="产品类别"
-            prop="categoryName"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="物料分组"
-            prop="materialGroupName"
-            min-width="200"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.materialNumber" />
-              <span>{{ scope.row.materialNumber }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.materialOldNumber" />
-              <span>{{ scope.row.materialOldNumber }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.materialName" />
-              <span>{{ scope.row.materialName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.specification" />
-              <span>{{ scope.row.specification }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="left"
-            label="单位"
-            prop="baseUnitId"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="总库存数量"
-            prop="stockQty"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="可用库数"
-            prop="stockAdequate"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="可开单数"
-            prop="openNumber"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="经销商预留库存"
-            prop="reservedNum"
-            min-width="120"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="经销商暂扣库存"
-            prop="temporaryNum"
-            min-width="120"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="left"
-            label="开单未提数量"
-            prop="num"
-            min-width="120"
-            show-overflow-tooltip
-          ></el-table-column>
-        </el-table>
-      </div>
-    </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>
-  </div>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :operation="operation()"
+    :optionsEvensGroup="optionsEvensGroup"
+    :columnParsing="columnParsing"
+  >
+
+  </template-page>
 </template>
 
 <script>
-import { getStockList, getWarehouseList } from '@/api/stock'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getStockListV2, getWarehouseList,exportStockListV2 } from '@/api/stock'
 import { getCategoryList, getSmallList } from '@/api/common'
-
 export default {
+  components: { TemplatePage, Popu },
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
@@ -234,36 +58,49 @@ export default {
       positionList: [],
       typeList: [],
       smallList: [],
-      isCollapse: true
-    }
-  },
-
-  computed: {
-    exParams() {
-      const correspondNameS = this.fliterData()
-      return {
-        correspondId: this.screenForm.warehouse.join(),
-        correspondNameS: correspondNameS.join('/'),
-        stockId: this.screenForm.position,
-        materialName: this.screenForm.goodsName,
-        materialNumber: this.screenForm.goodsCode,
-        materialOldNumber: this.screenForm.goodsNum,
-        specification: this.screenForm.model,
-        mainNumber: this.screenForm.type,
-        categoryId: this.screenForm.categoryId.join(',')
-      }
     }
   },
-
-  created() {
-    this.getWarehouseList()
-    this.getCategoryList()
-    this.getList()
-  },
-
   methods: {
-    // 获取仓库列表
-    getWarehouseList() {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getStockListV2(...p)
+    },
+    // 列表导出函数
+    exportList: exportStockListV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            {/* <el-button
+              size="mini"
+              type="text"
+              onClick={ () => {
+                this.visible = true
+                this.detailsId = row.id
+              }}
+            >
+              查看
+            </el-button> */}
+          </div>
+        )
+      }
+    },
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
+    },
+     // 获取仓库列表
+     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
         pageSize: -1
@@ -289,88 +126,7 @@ export default {
       })
     },
 
-    // 更改大类
-    changeType() {
-      this.screenForm.categoryId = ''
-      if (this.screenForm.type) {
-        this.getSmallList()
-      } else {
-        this.smallList = []
-      }
-    },
-
-    // 更改仓库
-    changeWarehouse() {
-      // this.screenForm.position = '';
-      // if(this.screenForm.warehouse) {
-      //   let obj = this.warehouseList.find(o => o.id == this.screenForm.warehouse);
-      //   this.positionList = obj.kingDeeStocks;
-      // }else {
-      //   this.positionList = [];
-      // }
-    },
-
-    // 查询列表
-    getList() {
-      this.listLoading = true
-      const correspondNameS = this.fliterData()
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        correspondId: this.screenForm.warehouse.join(),
-        correspondNameS: correspondNameS.join('/'),
-        stockId: this.screenForm.position,
-        materialName: this.screenForm.goodsName,
-        materialNumber: this.screenForm.goodsCode,
-        materialOldNumber: this.screenForm.goodsNum,
-        specification: this.screenForm.model,
-        mainNumber: this.screenForm.type,
-        categoryId: this.screenForm.categoryId.join(',')
-      }
-      getStockList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
 
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1
-      this.getList()
-    },
-
-    // 重置筛选表单
-    resetScreenForm() {
-        this.$refs.screenForm.resetFields()
-      this.currentPage = 1
-      this.getList()
-    },
-
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
-    },
-
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
-    },
-    fliterData() {
-      const correspondNameS = []
-      if (this.screenForm.warehouse && this.screenForm.warehouse.length)
-        this.screenForm.warehouse.forEach(e => {
-          this.warehouseList.filter(k => {
-            if (e === k.id) {
-              correspondNameS.push(k.name)
-            }
-          })
-        })
-      return correspondNameS
-    }
   }
 }
 </script>

+ 69 - 300
src/views/supply/allot/allot_list.vue

@@ -1,324 +1,93 @@
 <template>
-  <div class="app-container">
-    <div v-show="!isShowDetail">
-      <!-- 筛选条件 -->
-      <div class="screen-container">
-        <Collapse :screen-form="screenForm">
-          <template #right_btn>
-            <el-button size="mini" @click="resetScreenForm">清空</el-button>
-            <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-          </template>
-          <template #search>
-            <el-form ref="screenForm" :model="screenForm" label-width="120px" size="mini" label-position="left">
-              <el-row :gutter="20">
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="单据编号" prop="orderNum">
-                    <el-input v-model="screenForm.orderNum" placeholder="请输入单据编号"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="产品名称" prop="wlName">
-                    <el-input v-model="screenForm.wlName" placeholder="请输入产品名称"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="提货日期" prop="date">
-                    <el-date-picker
-                      v-model="screenForm.date"
-                      type="datetimerange"
-:default-time="['00:00:00','23:59:59']"
-                      range-separator="至"
-                      style="width: 100%"
-
-                      start-placeholder="开始日期"
-                      end-placeholder="结束日期"
-                    >
-                    </el-date-picker>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
-          </template>
-        </Collapse>
-      </div>
-
-      <div class="mymain-container">
-        <div class="btn-group clearfix">
-          <div class="fr">
-            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
-          </div>
-        </div>
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column
-              align="center"
-              label="单据编号"
-              prop="billNo"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="单据类型"
-              prop="billType"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="调拨类型"
-              prop="transferBizType"
-              min-width="120"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.transferBizType | allotTypeFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="申请日期"
-              prop="fDate"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="单据状态"
-              prop="documentStatus"
-              min-width="100"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.documentStatus | orderStatusFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="关闭状态" prop="cancelStatus" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.cancelStatus | closeStatusFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="物料编码"
-              prop="materialNumber"
-              min-width="120"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="规格型号"
-              prop="model"
-              min-width="240"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="辅助属性"
-              prop="auxPropId"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="单位"
-              prop="baseUnitId"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="申请数量"
-              prop="qty"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="调出仓库"
-              prop="srcStockName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="调入仓库"
-              prop="destStockName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="center" label="操作" width="100" fixed="right">
-              <template slot-scope="scope">
-                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </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>
-    </div>
-
-    <AllotDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
-  </div>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :operation="operation()"
+    :optionsEvensGroup="optionsEvensGroup"
+    :columnParsing="columnParsing"
+  >
+    <Popu v-if="visible">
+      <AllotDetail :listItem="queryItem" @close="handleClose" />
+    </Popu>
+  </template-page>
 </template>
 
 <script>
-import { getList } from '@/api/supply/allot'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getTransferV2,exportTransferV2 } from '@/api/supply/allot'
 import AllotDetail from '@/views/supply/allot/components/allot_detail'
 
 export default {
-  components: {
-    AllotDetail
-  },
-  filters: {
-    allotTypeFilter(val) {
-      const MAP = {
-        InnerOrgTransfer: '组织内调拨',
-        OverOrgTransfer: '跨组织调拨'
-      }
-      return MAP[val]
-    },
-    closeStatusFilter(val) {
-      const MAP = {
-        A: '正常',
-        B: '作废'
-      }
-      return MAP[val]
-    },
-    orderStatusFilter(val) {
-      const MAP = {
-        C: '审核'
-      }
-      return MAP[val]
-    }
-  },
+  components: { TemplatePage, Popu, AllotDetail },
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
-      dataList: null, // 列表数据
-      listLoading: false, // 列表加载loading
-      screenForm: {
-        // 筛选表单数据
-        orderNum: '',
-        wlName: '',
-        date: []
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
       },
-      isCollapse: true,
-      queryItem: {}
-    }
-  },
+      recordSelected: [],
 
-  computed: {
-    exParams() {
-      return {
-        billNo: this.screenForm.orderNum,
-        materialName: this.screenForm.wlName,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : ''
-      }
-    },
-    isShowDetail() {
-      return this.queryItem.hasOwnProperty('id')
+      queryItem: {}
     }
   },
-
-  created() {
-    this.getList()
-  },
-
   methods: {
-    // 查询按钮权限
-    checkBtnRole(value) {
-      // let btnRole = this.$route.meta.roles;
-      // if(!btnRole) {return true}
-      // let index = btnRole.indexOf(value);
-      // return index >= 0;
-      return true
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getTransferV2(...p)
     },
-
-    // 查询列表
-    getList() {
-      this.listLoading = true
-
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        billNo: this.screenForm.orderNum,
-        materialName: this.screenForm.wlName,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : ''
-      }
-      getList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
-
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1
-      this.getList()
+    // 列表导出函数
+    exportList: exportTransferV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
     },
-
-    // 重置筛选表单
-    resetScreenForm() {
-        this.$refs.screenForm.resetFields()
-      this.currentPage = 1
-      this.getList()
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
     },
-
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            <el-button
+              size="mini"
+              type="text"
+              onClick={ () => {
+                this.visible = true
+                this.toDetail(row)
+              }}
+            >
+              详情
+            </el-button>
+          </div>
+        )
+      }
     },
-
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
     },
-
-    // 进入详情
-    toDetail(item) {
+       // 进入详情
+       toDetail(item) {
       this.queryItem = item
     },
-
-    backList() {
-      this.queryItem = {}
-    }
   }
 }
 </script>

+ 1 - 1
src/views/supply/allot/components/allot_detail.vue

@@ -161,7 +161,7 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail')
+      this.$emit('close')
     },
 
     // 获取详情

+ 1 - 1
src/views/supply/purchase/components/enter_detail.vue

@@ -186,7 +186,7 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail')
+      this.$emit('close')
     },
 
     // 获取详情

+ 1 - 1
src/views/supply/purchase/components/purchase_detail.vue

@@ -216,7 +216,7 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail')
+      this.$emit('close')
     },
 
     // 获取详情

+ 66 - 318
src/views/supply/purchase/enter_list.vue

@@ -1,343 +1,91 @@
 <template>
-  <div class="app-container">
-    <div v-show="!isShowDetail">
-      <!-- 筛选条件 -->
-      <div class="screen-container">
-        <Collapse :screen-form="screenForm">
-          <template #right_btn>
-            <el-button size="mini" @click="resetScreenForm">清空</el-button>
-            <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-          </template>
-          <template #search>
-            <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
-              <el-row :gutter="20">
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="入库单号" prop="orderNum">
-                    <el-input v-model="screenForm.orderNum" placeholder="请输入入库单号"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="产品名称" prop="chName">
-                    <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="产品编码" prop="chNum">
-                    <el-input v-model="screenForm.chNum" placeholder="请输入产品编码"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="入库日期" prop="date">
-                    <el-date-picker
-                      v-model="screenForm.date"
-                      type="datetimerange"
-:default-time="['00:00:00','23:59:59']"
-                      range-separator="至"
-                      style="width: 100%"
-                      value-format="yyyy-MM-dd HH:mm:ss"
-                      start-placeholder="开始日期"
-                      end-placeholder="结束日期"
-                    >
-                    </el-date-picker>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="供货单位" prop="company">
-                    <el-input v-model="screenForm.company" placeholder="请输入供货单位"></el-input>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
-          </template>
-        </Collapse>
-      </div>
-
-      <div class="mymain-container">
-        <div class="btn-group clearfix">
-          <div class="fr">
-            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
-          </div>
-        </div>
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-            show-summary
-            :summary-method="$getSummaries"
-          >
-            <el-table-column align="left" label="入库单号" prop="billNo" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.billNo" />
-                <span>{{ scope.row.billNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="入库日期" prop="fdate" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.fdate | dateToDayFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="stockId"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="供货单位"
-              prop="supplyName"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="approveDate"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialNumber" />
-                <span>{{ scope.row.materialNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品编码"
-              prop="materialOldNumber"
-              min-width="140"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="uom" min-width="350" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.uom" />
-                <span>{{ scope.row.uom }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="realQty"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="right" label="原币含税单价" prop="taxPrice" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.taxPrice | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="right" label="原币金额" prop="amount" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.amount | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="right" label="原币税额" prop="entryTaxAmount" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.entryTaxAmount | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="right" label="原币价税合计" prop="allAmount" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.allAmount | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="税率"
-              prop="entryTaxRate"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="approverId"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="备注"
-              prop="abcdRemarks"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="center" label="操作" width="100" fixed="right">
-              <template slot-scope="scope">
-                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </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>
-    </div>
-
-    <EnterDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
-  </div>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :operation="operation()"
+    :optionsEvensGroup="optionsEvensGroup"
+    :columnParsing="columnParsing"
+  >
+    <Popu v-if="visible">
+      <EnterDetail :listItem="queryItem" @close="handleClose" />
+    </Popu>
+  </template-page>
 </template>
 
 <script>
-import { getEnterList } from '@/api/supply/purchase'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getPurchaseStockInListV2, exportPurchaseStockInV2 } from '@/api/supply/purchase'
 import EnterDetail from '@/views/supply/purchase/components/enter_detail'
 
 export default {
-  components: {
-    EnterDetail
-  },
+  components: { TemplatePage, Popu, EnterDetail },
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
-      dataList: null, // 列表数据
-      listLoading: false, // 列表加载loading
-      screenForm: {
-        // 筛选表单数据
-        orderNum: '',
-        chName: '',
-        chNum: '',
-        date: [],
-        company: ''
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
       },
-      isCollapse: true,
-      queryItem: {}
-    }
-  },
+      recordSelected: [],
 
-  computed: {
-    exParams() {
-      return {
-        billNo: this.screenForm.orderNum,
-        materialName: this.screenForm.chName,
-        materialCode: this.screenForm.chNum,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        supplyName: this.screenForm.company
-      }
-    },
-    isShowDetail() {
-      return this.queryItem.hasOwnProperty('id')
+      queryItem: {}
     }
   },
-
-  created() {
-    this.getList()
-  },
-
   methods: {
-    // 查询按钮权限
-    checkBtnRole(value) {
-      // let btnRole = this.$route.meta.roles;
-      // if(!btnRole) {return true}
-      // let index = btnRole.indexOf(value);
-      // return index >= 0;
-      return true
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getPurchaseStockInListV2(...p)
     },
-
-    // 查询列表
-    getList() {
-      this.listLoading = true
-
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        billNo: this.screenForm.orderNum,
-        materialName: this.screenForm.chName,
-        materialCode: this.screenForm.chNum,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        supplyName: this.screenForm.company
-      }
-      getEnterList(params).then(res => {
-        res.data.records.forEach(item => {
-          item.sums1 = ['auxUnitQty']
-          item.sums2 = ['taxPrice', 'amount', 'entryTaxAmount', 'allAmount']
-        })
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
+    // 列表导出函数
+    exportList: exportPurchaseStockInV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
     },
-
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1
-      this.getList()
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
     },
-
-    // 重置筛选表单
-    resetScreenForm() {
-        this.$refs.screenForm.resetFields()
-      this.currentPage = 1
-      this.getList()
-    },
-
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            <el-button
+              size="mini"
+              type="text"
+              onClick={() => {
+                this.visible = true
+                this.toDetail(row)
+              }}
+            >
+              详情
+            </el-button>
+          </div>
+        )
+      }
     },
-
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
     },
-
     // 进入详情
     toDetail(item) {
       this.queryItem = item
-    },
-
-    backList() {
-      this.queryItem = {}
     }
   }
 }

+ 70 - 321
src/views/supply/purchase/purchase_list.vue

@@ -1,260 +1,47 @@
 <template>
-  <div class="app-container">
-    <div v-show="!isShowDetail">
-      <!-- 筛选条件 -->
-      <div class="screen-container">
-        <Collapse :screen-form="screenForm">
-          <template #right_btn>
-            <el-button size="mini" @click="resetScreenForm">清空</el-button>
-            <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-          </template>
-          <template #search>
-            <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
-              <el-row :gutter="20">
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="业务类型" prop="business">
-                    <el-input v-model="screenForm.business" placeholder="请输入业务类型"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="供应商" prop="supplier">
-                    <el-input v-model="screenForm.supplier" placeholder="请输入供应商"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="采购日期" prop="date">
-                    <el-date-picker
-                      v-model="screenForm.date"
-                      type="datetimerange"
-:default-time="['00:00:00','23:59:59']"
-                      range-separator="至"
-                      style="width: 100%"
-                      value-format="yyyy-MM-dd HH:mm:ss"
-                      start-placeholder="开始日期"
-                      end-placeholder="结束日期"
-                    >
-                    </el-date-picker>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
-          </template>
-        </Collapse>
-      </div>
-
-      <div class="mymain-container">
-        <div class="btn-group clearfix">
-          <div class="fr">
-            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
-          </div>
-        </div>
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column align="left" label="业务类型" prop="businessType" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.businessType | businessTypeFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="采购日期" prop="fdate" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.fdate | dateToDayFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="订单编号" prop="billNo" min-width="140" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.billNo" />
-                <span>{{ scope.row.billNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="部门"
-              prop="purchaseDeptId"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="业务员"
-              prop="purchaserId"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="付款条件"
-              prop="payConditionId"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="币种"
-              prop="settleCurr"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="备注"
-              prop="abcdRemarks"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialNumber" />
-                <span>{{ scope.row.materialNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品编码"
-              prop="materialOldNumber"
-              min-width="140"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="数量"
-              prop="qty"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="原币含税单价"
-              prop="taxPrice"
-              min-width="120"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="原币单价"
-              prop="price"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="原币税额"
-              prop="entryTaxAmount"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="原币价税合计"
-              prop="billAllAmount"
-              min-width="120"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="采购单价"
-              prop="price"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="approverName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="变更人"
-              prop="changerName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="center" label="操作" width="100" fixed="right">
-              <template slot-scope="scope">
-                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </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>
-    </div>
-
-    <PurchaseDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
-  </div>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :operation="operation()"
+    :optionsEvensGroup="optionsEvensGroup"
+    :columnParsing="columnParsing"
+  >
+    <Popu v-if="visible">
+      <PurchaseDetail :listItem="queryItem" @close="handleClose" />
+    </Popu>
+  </template-page>
 </template>
 
 <script>
-import { getPurchaseList } from '@/api/supply/purchase'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getPurchaseOrderListV2,exportPurchaseOrderV2 } from '@/api/supply/purchase'
 import PurchaseDetail from '@/views/supply/purchase/components/purchase_detail'
 
 export default {
-  components: {
-    PurchaseDetail
-  },
-  filters: {
-    businessTypeFilter(val) {
-      const MAP = {
-        CG: '标准采购'
-      }
-      return MAP[val]
-    }
-  },
+  components: { TemplatePage, Popu, PurchaseDetail },
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+      
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
@@ -270,88 +57,50 @@ export default {
       queryItem: {}
     }
   },
-
-  computed: {
-    exParams() {
-      return {
-        businessType: this.screenForm.business,
-        assignSupplierId: this.screenForm.supplier,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : ''
-      }
-    },
-    isShowDetail() {
-      return this.queryItem.hasOwnProperty('id')
-    }
-  },
-
-  created() {
-    this.getList()
-  },
-
   methods: {
-    // 查询按钮权限
-    checkBtnRole(value) {
-      // let btnRole = this.$route.meta.roles;
-      // if(!btnRole) {return true}
-      // let index = btnRole.indexOf(value);
-      // return index >= 0;
-      return true
-    },
-
-    // 查询列表
-    getList() {
-      this.listLoading = true
-
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        businessType: this.screenForm.business,
-        assignSupplierId: this.screenForm.supplier,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : ''
-      }
-      getPurchaseList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getPurchaseOrderListV2(...p)
     },
-
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1
-      this.getList()
+    // 列表导出函数
+    exportList: exportPurchaseOrderV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
     },
-
-    // 重置筛选表单
-    resetScreenForm() {
-        this.$refs.screenForm.resetFields()
-      this.currentPage = 1
-      this.getList()
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
     },
-
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getList()
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            <el-button
+              size="mini"
+              type="text"
+              onClick={ () => {
+                this.visible = true
+                this.toDetail(row)
+              }}
+            >
+              详情
+            </el-button>
+          </div>
+        )
+      }
     },
-
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getList()
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
     },
-
-    // 进入详情
-    toDetail(item) {
+       // 进入详情
+       toDetail(item) {
       this.queryItem = item
     },
 
-    backList() {
-      this.queryItem = {}
-    }
   }
 }
 </script>