소스 검색

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

zh 2 년 전
부모
커밋
d65c97b7ce

+ 0 - 1
src/App.vue

@@ -10,7 +10,6 @@ export default {
   data() {
     return {}
   },
-
   methods: {}
 }
 </script>

+ 8 - 0
src/api/common.js

@@ -1,5 +1,13 @@
 import request from '@/utils/request'
 
+export function commonLogList(params) {
+  return request({
+    url: '/common/log/list',
+    method: 'get',
+    params
+  })
+}
+
 // 字典列表
 export function getDictList(params) {
   return request({

+ 56 - 2
src/components/template/template-page-1.vue

@@ -34,10 +34,21 @@
         <el-button size="mini" type="primary" @click="onSavePlanqd">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="操作记录" :visible.sync="logDialogVisible" width="800px">
+      <zj-table
+        :columns="pgxxColumns"
+        :tableData="pgxxTableData"
+        :tableAttributes="{
+          height: '100%',
+          border: true
+        }"
+      ></zj-table>
+    </el-dialog>
   </div>
 </template>
 
 <script>
+import { commonLogList } from '@/api/common.js'
 import { zfireSave, zfireDel } from '@/api/fieldMan.js'
 import { dictListDict } from '@/api/dataDictionary2.js'
 import { zfireParamList, zfireParamSave, zfireParamDelete } from '@/api/zfireParam.js'
@@ -119,6 +130,7 @@ export default {
   },
   data() {
     return {
+      logDialogVisible: false,
       dialogVisible: false,
       // 搜索的参数
       parameter: {},
@@ -147,7 +159,40 @@ export default {
         }
       ],
       paramList: [],
-      timePlan: []
+      timePlan: [],
+      pgxxColumns: [
+        {
+          columnAttributes: {
+            label: '帐号',
+            prop: 'userName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '操作内容',
+            prop: 'content'
+          }
+        },
+        {
+          columnAttributes: {
+            label: 'ip',
+            prop: 'ip'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '万能id',
+            prop: 'objId'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '模块名称',
+            prop: 'moduleName'
+          }
+        }
+      ],
+      pgxxTableData: []
     }
   },
   computed: {
@@ -278,7 +323,16 @@ export default {
             size="mini"
             type="text"
             onClick={() => {
-              console.log(row[this.operationRecordkey || this.pk || 'id'])
+              if (row[this.operationRecordkey || this.pk || 'id']) {
+                commonLogList({
+                  objId: row[this.operationRecordkey || this.pk || 'id'],
+                  pageNum: 1,
+                  pageSize: -1
+                }).then(res => {
+                  this.pgxxTableData = res.data.records
+                  this.logDialogVisible = true
+                })
+              }
             }}
           >
             操作记录

+ 9 - 1
src/layout/components/AppMain.vue

@@ -14,7 +14,7 @@
 
 <script>
 import { mapGetters } from 'vuex'
-
+import { setModuleId } from '@/utils/request'
 export default {
   name: 'AppMain',
   computed: {
@@ -28,6 +28,14 @@ export default {
     str() {
       return this.$store.state?.user?.name
     }
+  },
+  watch: {
+    $route() {
+      setModuleId(this.$route.meta.moduleId)
+    }
+  },
+  beforeCreate() {
+    setModuleId(this.$route.meta.moduleId)
   }
 }
 </script>

+ 3 - 12
src/layout/components/Navbar.vue

@@ -79,13 +79,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog
-      title="到货通知"
-      :modal="false"
-      width="70%"
-      :visible.sync="hasNotice"
-      @close="handleNotice(false)"
-    >
+    <el-dialog title="到货通知" :modal="false" width="70%" :visible.sync="hasNotice" @close="handleNotice(false)">
       <div class="mymain-container">
         <el-form ref="form" :model="form" label-width="80px" label-position="left" size="mini">
           <el-row>
@@ -358,7 +352,7 @@ export default {
       areaOpti: [
         { label: '弘格', value: '1' },
         { label: '广州', value: '2' },
-        { label: '佛山', value: '3'}
+        { label: '佛山', value: '3' }
       ]
     }
   },
@@ -382,9 +376,6 @@ export default {
   beforeDestroy() {
     window.clearInterval(this.intivalId)
     window.clearInterval(this.timer)
-
-    console.log('退出清理定时器' + this.timer)
-
     this.websocketOnclose()
   },
   computed: {
@@ -856,7 +847,7 @@ export default {
     }
   }
 }
-.tip{
+.tip {
   margin: 50px auto;
   text-align: center;
 }

+ 11 - 0
src/utils/request.js

@@ -3,6 +3,13 @@ import { MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import { getToken } from '@/utils/auth'
 
+var moduleId = ''
+
+export function setModuleId(val) {
+  console.log(val)
+  moduleId = val
+}
+
 // create an axios instance
 const service = axios.create({
   baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
@@ -21,6 +28,7 @@ service.interceptors.request.use(
       // ['X-Token'] is a custom headers key
       // please modify it according to the actual situation
       config.headers['x-token'] = getToken()
+      config.headers['moduleId'] = moduleId
     }
     return config
   },
@@ -92,6 +100,7 @@ export function postBlob(data) {
       url: process.env.VUE_APP_BASE_API + data.url, // 后端接口地址
       responseType: 'blob', // bolb格式的请求方式
       headers: {
+        moduleId,
         'x-token': getToken() // 请求头
       },
       data: data.data // 需要传给后端的请求参数体
@@ -126,6 +135,7 @@ export function getBlob(data) {
       responseType: 'blob',
       params: data.data, // 与post传参方式不同之处
       headers: {
+        moduleId,
         'x-token': getToken() // 请求头
       }
     })
@@ -163,6 +173,7 @@ export async function handleImport(url, formData, id = '') {
     axios
       .post(process.env.VUE_APP_BASE_API + url, formData, {
         headers: {
+          moduleId,
           'Content-Type': 'multipart/form-data',
           'x-token': getToken(),
           id

+ 1 - 1
src/views/supply/price/difference_modify_list.vue

@@ -30,7 +30,7 @@ import ModifyListApply from './components/modify_list-apply.vue'
 import ModifyListApproval from './components/modify_list-approval.vue'
 import ModifyListDetail from './components/modify_list-detail.vue'
 import ExamineDialog from '@/components/Common/examine-dialog'
-import Mixin from '@/mixin/index'
+// import Mixin from '@/mixin/index'
 import {
   getPriceSubmit,
   getProductRricedel,

+ 242 - 433
src/views/supply/price/modify_list.vue

@@ -1,429 +1,140 @@
 <template>
-  <div class="app-container">
-    <div v-if="show === 1">
-      <!-- 筛选条件 -->
-      <div>
-        <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="70px" size="mini" label-position="left">
-                <el-row :gutter="20">
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="物料编码" prop="materialNumber">
-                      <el-input placeholder="请输入物料编码" v-model="screenForm.materialNumber"></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="产品名称" prop="materialName">
-                      <el-input placeholder="请输入产品名称" v-model="screenForm.materialName"></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="产品编码" prop="materialOldNumber">
-                      <el-input placeholder="请输入产品编码" v-model="screenForm.materialOldNumber"></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <!--              <el-col :xs="24" :sm="12" :lg="6">-->
-                  <!--                <el-form-item label="生效日期" prop="startDate">-->
-                  <!--                  <el-date-picker-->
-                  <!--                    v-model="screenForm.startDate"-->
-                  <!--                    type="datetime"-->
-                  <!--                    placeholder="请输入生效日期"-->
-                  <!--                    value-format="yyyy-MM-dd HH:mm:ss"-->
-                  <!--                  >-->
-                  <!--                  </el-date-picker>-->
-                  <!--                </el-form-item>-->
-                  <!--              </el-col>-->
-                  <!--              <el-col :xs="24" :sm="12" :lg="6">-->
-                  <!--                <el-form-item label="失效日期" prop="endDate">-->
-                  <!--                  <el-date-picker-->
-                  <!--                    v-model="screenForm.endDate"-->
-                  <!--                    type="datetime"-->
-                  <!--                    placeholder="请输入生效日期"-->
-                  <!--                    value-format="yyyy-MM-dd HH:mm:ss "-->
-                  <!--                  >-->
-                  <!--                  </el-date-picker>-->
-                  <!--                </el-form-item>-->
-                  <!--              </el-col>-->
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="销售类型" prop="saleTypeId">
-                      <el-select
-                        v-model="screenForm.saleTypeId"
-                        filterable
-                        placeholder="选择销售类型"
-                        style="width: 100%"
-                      >
-                        <el-option label="全部" value=""></el-option>
-                        <el-option
-                          v-for="item in typeList"
-                          :key="item.id"
-                          :label="item.saleName"
-                          :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="k3CategoryNumber">
-                      <el-select style="width: 100%" placeholder="请选择产品类别" v-model="screenForm.k3CategoryNumber">
-                        <el-option label="全部" value=""></el-option>
-                        <el-option v-for="item in dictList" :label="item.name" :value="item.number"></el-option>
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="规格型号" prop="specification">
-                      <el-input placeholder="请输入规格型号" v-model="screenForm.specification"></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="备注" prop="remark">
-                      <el-input placeholder="请输入备注" v-model="screenForm.remark"></el-input>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-            </template>
-          </Collapse>
-        </div>
-      </div>
-      <!-- 按钮 -->
-      <div class="btn-group clearfix">
-        <div class="fl">
-          <el-button
-            type="primary"
-            v-if="$checkBtnRole('add', $route.meta.roles)"
-            icon="el-icon-plus"
-            size="mini"
-            @click="addFn"
-            >新增</el-button
-          >
-          <!-- <el-button type="primary" size="mini">编辑</el-button> -->
-          <el-upload
-            style="margin-bottom: 10px"
-            class="import-btn"
-            :action="baseURL + 'student/import'"
-            :http-request="handleImport"
-            :file-list="importFileList"
-            :show-file-list="false"
-            :disabled="importLoading"
-            v-loading="importLoading"
-          >
-            <el-button type="primary" size="mini">导入调价单 </el-button>
-          </el-upload>
-          <el-button type="primary" size="mini" @click="hanleDownloadFiles">下载模板 </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="内容确定删除吗?"
-            style="margin-right: 10px"
-            @onConfirm="hanleDeleteAll"
-          >
-            <el-button type="primary" size="mini" icon="el-icon-delete" slot="reference" class="el-popover-left"
-              >删除</el-button
-            >
-          </el-popconfirm>
-          <el-button
-            size="mini"
-            type="warning"
-            icon="el-icon-finished"
-            @click="batchExamine"
-            v-if="$checkBtnRole('examine', $route.meta.roles)"
-            >批量审批</el-button
-          >
-        </div>
-        <div class="fr">
-          <ExportButton :exUrl="'product-upd-price/export'" :exParams="exParams" />
-          <!-- <el-button type="primary" size="mini">导入</el-button>
-          <el-button type="primary" size="mini">导出</el-button>
-          <el-button type="primary" size="mini">打印</el-button> -->
-        </div>
-      </div>
-      <div class="mymain-container">
-        <!-- 列表 -->
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            @select-all="hanleSelectAll"
-            @select="hanleSelectAll"
-            :row-class-name="tableRowClassName"
-          >
-            <el-table-column type="selection" align="left" width="50"></el-table-column>
-            <el-table-column align="left" label="单据号" prop="updPriceBillId" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.updPriceBillId" />
-                <span>{{ scope.row.updPriceBillId }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="备注"
-              prop="remark"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="销售类型"
-              prop="saleTypeName"
-              :formatter="formatterType"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <!-- <el-table-column
-              align="left"
-              label="产品类别"
-              prop="mainName"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column> -->
-            <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="160" 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="materialName" min-width="200" 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="materialOldNumber"
-              min-width="200"
-              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="specification" min-width="200" 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="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="qty"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="批发价"
-              prop="batchPrice"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :operation="operation()"
+    :optionsEvensGroup="optionsEvensGroup"
+    :exportList="exportList"
+    :columnParsing="columnParsing"
+    :tableAttributes="tableAttributes"
+    :tableEvents="tableEvents"
+  >
+    <ExamineDialog @submit="submitExamineForm" :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
 
-            <el-table-column
-              align="right"
-              label="格力折扣"
-              prop="discAmount"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="调价日期"
-              prop="createTime"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="生效日期"
-              prop="startDate"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="失效日期"
-              prop="endDate"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <!-- <el-table-column
-              align="left"
-              label="是否促销价"
-              prop="isPromote"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <el-tag size="mini" type="success" v-if="scope.row.isPromote">是</el-tag>
-                <el-tag size="mini"  type="danger" v-else>否</el-tag>
-              </template>
-            </el-table-column> -->
-            <el-table-column align="left" label="返利类型(钱包)" prop="wallets" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <template v-for="(item, index) in scope.row.wallets">
-                  <template v-if="item.type === 'REBATE'">
-                    <el-tag type="success" style="margin: 0 10px" size="mini" :key="index">
-                      {{ item.walletName }}
-                    </el-tag>
-                  </template>
-                </template>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="现金钱包"
-              prop="modifyPriceDepartment"
-              min-width="200"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <template v-for="(item, index) in scope.row.wallets">
-                  <template v-if="item.type === 'COMMONLY'">
-                    <el-tag type="success" style="margin: 0 10px" size="mini" :key="index">
-                      {{ item.walletName }}
-                    </el-tag>
-                  </template>
-                </template>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="调价部门"
-              prop="adminWebsitName"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="调价业务员"
-              prop="serviceName"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="制单日期"
-              prop="createTime"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="confirmName"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="confirmTime"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="left" label="状态" prop="examineStatus" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <el-tag size="mini" type="success" v-if="scope.row.examineStatus == 'SAVE'">保存</el-tag>
-                <el-tag size="mini" type="danger" v-else-if="scope.row.examineStatus == 'WAIT'">待审核</el-tag>
-                <el-tag size="mini" type="danger" v-else-if="scope.row.examineStatus == 'OK'">通过</el-tag>
-                <el-tag size="mini" type="danger" v-else-if="scope.row.examineStatus == 'FAIL'">不通过</el-tag>
-                <el-tag size="mini" type="danger" v-else>审核</el-tag>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="操作" fixed="right" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <template v-if="scope.row.examineStatus == 'SAVE'">
-                  <el-popconfirm
-                    title="确定提审吗?"
-                    @onConfirm="handleGetPriceSubmit(scope.row.updPriceBillId)"
-                    style="margin-right: 10px"
-                  >
-                    <el-button type="text" slot="reference">提审</el-button>
-                  </el-popconfirm>
-                </template>
-                <template v-if="scope.row.examineStatus == 'WAIT'">
-                  <el-button type="text" class="textColor" @click="approvalFn(scope.row.updPriceBillId)"
-                    >审批</el-button
-                  >
-                </template>
-                <el-button
-                  v-if="scope.row.examineStatus == 'SAVE'"
-                  type="text"
-                  class="textColor"
-                  @click="editFn(scope.row.updPriceBillId, scope.row)"
-                  >编辑</el-button
-                >
-                <el-button type="text" class="textColor" @click="detailFn(scope.row.updPriceBillId)">详情</el-button>
-              </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>
-    </div>
-    <ModifyListApply v-else-if="show === 2 || show == 5" :cid="cid" />
-    <ModifyListApproval v-else-if="show === 3" :detail="detail" />
-    <ModifyListDetail v-else :detail="detail" />
-    <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
-  </div>
+    <Popu v-if="show !== 1">
+      <ModifyListApply v-if="show === 2 || show == 5" :cid="cid" :show="show" @back="handleClose" />
+      <ModifyListApproval v-if="show === 3" :detail="detail" @back="handleClose" />
+      <ModifyListDetail v-if="show === 4" :detail="detail" @back="handleClose" />
+    </Popu>
+  </template-page>
 </template>
 
 <script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import Popu from '@/components/template/popu.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+
 import ModifyListApply from './components/modify_list-apply.vue'
 import ModifyListApproval from './components/modify_list-approval.vue'
 import ModifyListDetail from './components/modify_list-detail.vue'
 import ExamineDialog from '@/components/Common/examine-dialog'
-import Mixin from '@/mixin/index'
+// import Mixin from '@/mixin/index'
 import {
   getPriceSubmit,
   getProductRricedel,
   getProductRriceDetail,
   getProductRriceList,
   getTypeList,
-  examineData
+  examineData,
+  v2ProductUpdPriceList,
+  v2ProductUpdPriceListExport,
+  productUpdPriceDownload,
+  productUpdPriceMaterialImport
 } from '@/api/basic_data/material'
-import { downloadFiles, handleImport } from '@/utils/util'
+// import { downloadFiles, handleImport } from '@/utils/util'
 import { getCategoryList } from '@/api/common'
 
 export default {
-  mixins: [Mixin],
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
+      handleClose: this.addOff(() => {
+        if (this.show === 2 || this.show === 5) {
+          this.cid = ''
+          this.show = 1
+        }
+        this.show = 1
+        this.$refs.pageRef.refreshList()
+      }),
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '新增',
+              click: this.addOn(() => {
+                this.addFn()
+              })
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '批量删除',
+              click: async () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.error('请选择需要删除的数据')
+                  return
+                }
+                this.hanleDeleteAll()
+              },
+              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '批量审批',
+              click: async () => {
+                this.batchExamine()
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '',
+              render: this.importButton(productUpdPriceMaterialImport, '导入', {
+                billType: 'GENERAL'
+              })
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '导入模版',
+              click: () => {
+                productUpdPriceDownload({}, `${this.$route.meta.title}`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
+            }
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
+
       baseURL: '',
       importFileList: [],
       show: 1,
@@ -500,7 +211,9 @@ export default {
     ExamineDialog,
     ModifyListApply,
     ModifyListApproval,
-    ModifyListDetail
+    ModifyListDetail,
+    TemplatePage,
+    Popu
   },
   computed: {
     exParams() {
@@ -534,6 +247,89 @@ export default {
     })
   },
   methods: {
+    // 列表请求函数
+    getList(...p) {
+      let params = {
+        moduleId: p[0].moduleId,
+        orderBy: p[0].orderBy,
+        pageNum: p[0].pageNum,
+        pageSize: p[0].pageSize,
+        params: [...p[0].params, { param: 'a.bill_type', compare: '=', value: 'HOME' }]
+      }
+      return v2ProductUpdPriceList(params)
+    },
+    // 列表导出函数
+    exportList: v2ProductUpdPriceListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            {row.examineStatus == '保存' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.handleGetPriceSubmit(row.updPriceBillId)
+                }}
+                title="是否确定需要提审该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  提审
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == '待审核' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.approvalFn(row.updPriceBillId)
+                }}
+                title="是否确定需要审批该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  审批
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == '保存' ? (
+              <el-button
+                size="mini"
+                type="text"
+                onClick={async () => {
+                  this.editFn(row.updPriceBillId, row)
+                }}
+              >
+                编辑
+              </el-button>
+            ) : (
+              ''
+            )}
+
+            <el-button
+              size="mini"
+              type="text"
+              onClick={async () => {
+                this.detailFn(row.updPriceBillId)
+              }}
+            >
+              详情
+            </el-button>
+          </div>
+        )
+      }
+    },
+
     formatterType(row) {
       for (let i = 0; i < this.typeList.length; i++) {
         if (this.typeList[i].id == row.saleTypeId) {
@@ -544,17 +340,28 @@ export default {
     addFn() {
       this.show = 2
     },
+    hanleDeleteAllPromise(id) {
+      return new Promise((resolve, reject) => {
+        const ids = id ? [id] : this.recordSelected.map(v => v.updPriceBillId)
+        if (!ids.length) {
+          this.$errorMsg('请选择删除内容')
+          return
+        }
+        resolve(ids)
+      })
+    },
     hanleDeleteAll(id) {
       this.hanleDeleteAllPromise(id).then(ids => {
         getProductRricedel(ids).then(res => {
           this.$successMsg('删除成功')
-          this.getList()
+          // this.getList()
+          this.$refs.pageRef.refreshList()
         })
       })
     },
     // 打开 批量审批
     batchExamine() {
-      if (this.ids.length) {
+      if (this.recordSelected.length) {
         this.isShowExamineDialog = true
         return
       }
@@ -565,7 +372,7 @@ export default {
       // let ids = this.dis.map(item => {
       //   return item
       // });
-      const ids = [...new Set(this.ids)]
+      const ids = [...new Set(this.recordSelected.map(v => v.updPriceBillId))]
       examineData({
         ids: ids.join(','),
         examineStatus: this.examineForm.status,
@@ -573,14 +380,16 @@ export default {
       }).then(res => {
         this.isShowExamineDialog = false
         this.$successMsg('修改成功')
-        this.getList()
+        // this.getList()
+        this.$refs.pageRef.refreshList()
       })
     },
     handleGetPriceSubmit(id) {
       console.log(id)
       getPriceSubmit({ ids: id }).then(res => {
         this.$successMsg('已提审')
-        this.getList()
+        // this.getList()
+        this.$refs.pageRef.refreshList()
       })
     },
     approvalFn(id) {
@@ -596,28 +405,28 @@ export default {
         this.show = 4
       })
     },
-    getList() {
-      this.listLoading = true
-      console.log(456654)
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        materialName: this.screenForm.materialName,
-        materialNumber: this.screenForm.materialNumber,
-        startDate: this.screenForm.startDate,
-        materialOldNumber: this.screenForm.materialOldNumber,
-        saleTypeId: this.screenForm.saleTypeId,
-        k3CategoryNumber: this.screenForm.k3CategoryNumber,
-        specification: this.screenForm.specification,
-        remark: this.screenForm.remark,
-        billType: 'HOME'
-      }
-      getProductRriceList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
+    // getList() {
+    //   this.listLoading = true
+    //   console.log(456654)
+    //   let params = {
+    //     pageNum: this.currentPage,
+    //     pageSize: this.pageSize,
+    //     materialName: this.screenForm.materialName,
+    //     materialNumber: this.screenForm.materialNumber,
+    //     startDate: this.screenForm.startDate,
+    //     materialOldNumber: this.screenForm.materialOldNumber,
+    //     saleTypeId: this.screenForm.saleTypeId,
+    //     k3CategoryNumber: this.screenForm.k3CategoryNumber,
+    //     specification: this.screenForm.specification,
+    //     remark: this.screenForm.remark,
+    //     billType: 'HOME'
+    //   }
+    //   getProductRriceList(params).then(res => {
+    //     this.dataList = res.data.records
+    //     this.listTotal = res.data.total
+    //     this.listLoading = false
+    //   })
+    // },
     editFn(id, row) {
       this.cid = id
       this.show = 5