Browse Source

no message

linwenxin 8 months ago
parent
commit
559e966824
17 changed files with 1402 additions and 998 deletions
  1. 149 116
      src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryChargeManagement/index.vue
  2. 96 34
      src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryChargeManagement/selectGoods.vue
  3. 198 137
      src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryMaterialClass/index.vue
  4. 102 57
      src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryMaterialClass/index_cp.vue
  5. 313 263
      src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryPriceManagement/index.vue
  6. 140 118
      src/views/auxiliaryFittings/auxiliaryDataManagement/masterAuxiliaryMaterials/index.vue
  7. 96 32
      src/views/auxiliaryFittings/auxiliaryDataManagement/masterAuxiliaryMaterials/selectGoods.vue
  8. 18 20
      src/views/auxiliaryFittings/auxiliaryDataManagement/partsSalesRatio/index.vue
  9. 19 12
      src/views/auxiliaryFittings/inventoryManagement/auxiliaryInventory/index.vue
  10. 14 7
      src/views/auxiliaryFittings/inventoryManagement/auxiliaryInventoryDetails/index.vue
  11. 14 7
      src/views/auxiliaryFittings/inventoryManagement/masterAuInvenDetails/index.vue
  12. 20 13
      src/views/auxiliaryFittings/inventoryManagement/masterAuxiliaryInven/index.vue
  13. 14 7
      src/views/auxiliaryFittings/inventoryManagement/masterPaInvenDetails/index.vue
  14. 19 12
      src/views/auxiliaryFittings/inventoryManagement/masterPartsInven/index.vue
  15. 19 12
      src/views/auxiliaryFittings/inventoryManagement/partsInventory/index.vue
  16. 14 7
      src/views/auxiliaryFittings/inventoryManagement/partsInventoryDetails/index.vue
  17. 157 144
      src/views/auxiliaryFittings/projectAttachmentManage/index.vue

+ 149 - 116
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryChargeManagement/index.vue

@@ -1,26 +1,45 @@
 <template>
   <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
     <template slot-scope="{ activeKey, data }">
-      <template-page v-if="activeKey == 'list'" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
-        :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
-        :column-parsing="columnParsing" :operation="operation()" :exportList="exportList" :operationColumnWidth="80">
+      <template-page
+        v-if="activeKey == 'list'"
+        ref="pageRef"
+        :get-list="getList"
+        :table-attributes="tableAttributes"
+        :table-events="tableEvents"
+        :options-evens-group="optionsEvensGroup"
+        :moreParameters="moreParameters"
+        :column-parsing="columnParsing"
+        :operation="operation()"
+        :exportList="exportList"
+        :operationColumnWidth="80"
+      >
       </template-page>
       <div v-if="~['add', 'edit'].indexOf(activeKey)">
-        <div style="box-sizing: border-box;padding: 20px">
+        <div style="box-sizing: border-box; padding: 20px">
           <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
             <zj-form-module title="编辑" label-width="180px" :form-data="formData" :form-items="formItems">
             </zj-form-module>
-            <zj-form-module v-if="formData.normType === 'M'" title="添加辅材" label-width="0px" :form-data="formData"
-              :form-items="formItems2">
+            <zj-form-module
+              v-if="formData.normType === 'M'"
+              title="添加辅材"
+              label-width="0px"
+              :form-data="formData"
+              :form-items="formItems2"
+            >
             </zj-form-module>
           </zj-form-container>
         </div>
-        <div slot="footer" style="box-sizing: border-box;padding-bottom: 20px; padding-right: 20px;text-align: right">
+        <div slot="footer" style="box-sizing: border-box; padding-bottom: 20px; padding-right: 20px; text-align: right">
           <el-button size="mini" @click="data.removeTab()">取 消</el-button>
           <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
         </div>
-        <selectGoods v-if="formVisible" @close="close" @confirm="confirm"
-          :guolvList="(formData.items || []).map(item => item.workerGoodsId)" />
+        <selectGoods
+          v-if="formVisible"
+          @close="close"
+          @confirm="confirm"
+          :guolvList="(formData.items || []).map(item => item.workerGoodsId)"
+        />
       </div>
     </template>
   </zj-tab-page>
@@ -109,7 +128,7 @@ export default {
           [
             this.optionsEvensAuth(['imp', 'template'], {
               name: '导入物料',
-              click: () => { }
+              click: () => {}
             }),
             this.optionsEvensAuth('imp', ({ moduleName }) => {
               return {
@@ -137,7 +156,7 @@ export default {
           [
             this.optionsEvensAuth(['Import', 'downloadTemplate'], {
               name: '导入服务',
-              click: () => { }
+              click: () => {}
             }),
             this.optionsEvensAuth('Import', ({ moduleName }) => {
               return {
@@ -457,100 +476,112 @@ export default {
       ]
     },
     formItems2() {
-      return [{
-        name: 'slot-component',
-        md: 24,
-        formItemAttributes: {
-          'label-width': '0px',
-          label: '',
-          prop: 'items',
-          rules: [...required]
-        },
-        render: (h, { props }) => {
-          return (
-            <div>
+      return [
+        {
+          name: 'slot-component',
+          md: 24,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '',
+            prop: 'items',
+            rules: [...required]
+          },
+          render: (h, { props }) => {
+            return (
               <div>
-                <el-button
-                  size="mini"
-                  type="primary"
-                  onClick={() => {
-                    this.formVisible = true
-                  }}
-                >
-                  新增
-                </el-button>
+                <div>
+                  <el-button
+                    size="mini"
+                    type="primary"
+                    onClick={() => {
+                      this.formVisible = true
+                    }}
+                  >
+                    新增
+                  </el-button>
+                </div>
+                <zj-table
+                  columns={[
+                    {
+                      columnAttributes: {
+                        label: '大类名称',
+                        prop: 'parentCategoryName'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '小类名称',
+                        prop: 'goodsCategoryName'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '辅材名称',
+                        prop: 'workerGoodsName'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '单位',
+                        prop: 'salesUnit'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '商品代码',
+                        prop: 'goodsCode'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '数量',
+                        prop: 'qty',
+                        width: 150
+                      },
+                      render: (h, { row, column, index }) => {
+                        return (
+                          <div style="padding: 0 10px">
+                            <el-input
+                              value={row[column.columnAttributes.prop]}
+                              onInput={val => {
+                                row[column.columnAttributes.prop] = val
+                              }}
+                              placeholder="请输入内容"
+                            ></el-input>
+                          </div>
+                        )
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '操作',
+                        prop: ''
+                      },
+                      render: (h, { row, column, index }) => {
+                        return (
+                          <div style="padding: 0 10px">
+                            <el-button
+                              size="mini"
+                              type="text"
+                              onClick={() => {
+                                this.formData.items.splice(index, 1)
+                              }}
+                            >
+                              删除
+                            </el-button>
+                          </div>
+                        )
+                      }
+                    }
+                  ]}
+                  table-data={this.formData.items || []}
+                />
               </div>
-              <zj-table columns={[{
-                columnAttributes: {
-                  label: '大类名称',
-                  prop: 'parentCategoryName',
-                }
-              },
-              {
-                columnAttributes: {
-                  label: '小类名称',
-                  prop: 'goodsCategoryName',
-                }
-              }, {
-                columnAttributes: {
-                  label: '辅材名称',
-                  prop: 'workerGoodsName',
-                }
-              }, {
-                columnAttributes: {
-                  label: '单位',
-                  prop: 'salesUnit',
-                }
-              }, {
-                columnAttributes: {
-                  label: '商品代码',
-                  prop: 'goodsCode',
-                }
-              }, {
-                columnAttributes: {
-                  label: '数量',
-                  prop: 'qty',
-                  width: 150
-                },
-                render: (h, { row, column, index }) => {
-                  return (
-                    <div style="padding: 0 10px">
-                      <el-input
-                        value={row[column.columnAttributes.prop]}
-                        onInput={val => {
-                          row[column.columnAttributes.prop] = val
-                        }}
-                        placeholder="请输入内容"
-                      ></el-input>
-                    </div>
-                  )
-                }
-              }, {
-                columnAttributes: {
-                  label: '操作',
-                  prop: '',
-                },
-                render: (h, { row, column, index }) => {
-                  return (
-                    <div style="padding: 0 10px">
-                      <el-button
-                        size="mini"
-                        type="text"
-                        onClick={() => {
-                          this.formData.items.splice(index, 1)
-                        }}
-                      >
-                        删除
-                      </el-button>
-                    </div>
-                  )
-                }
-              }]} table-data={this.formData.items || []} />
-            </div>
-          )
+            )
+          }
         }
-      }]
-    },
+      ]
+    }
   },
   methods: {
     // 列表请求函数
@@ -575,7 +606,7 @@ export default {
         }
       })
     },
-    openForm() { },
+    openForm() {},
     openForm(type, id) {
       this.$refs.tabPage.addTab({
         // 对应显示的模块
@@ -652,21 +683,23 @@ export default {
       this.formVisible = false
     },
     confirm(data) {
-      data.filter(val => !~this.formData.items.map(item => item.workerGoodsId).indexOf(val.goodsId)).map(item => {
-        this.formData.items.push({
-          "goodsCategoryId": item.categoryId,
-          "goodsCategoryName": item.categoryName,
-          "goodsCode": item.goodsCode,
-          "salesUnit": item.salesUnit,
-          "parentCategoryId": item.parentCategoryId,
-          "parentCategoryName": item.parentCategoryName,
-          "workerGoodsId": item.goodsId,
-          "workerGoodsName": item.goodsName,
-          "qty": ""
+      data
+        .filter(val => !~this.formData.items.map(item => item.workerGoodsId).indexOf(val.goodsId))
+        .map(item => {
+          this.formData.items.push({
+            goodsCategoryId: item.categoryId,
+            goodsCategoryName: item.categoryName,
+            goodsCode: item.goodsCode,
+            salesUnit: item.salesUnit,
+            parentCategoryId: item.parentCategoryId,
+            parentCategoryName: item.parentCategoryName,
+            workerGoodsId: item.goodsId,
+            workerGoodsName: item.goodsName,
+            qty: ''
+          })
         })
-      })
       this.close()
-    },
+    }
   }
 }
 </script>

+ 96 - 34
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryChargeManagement/selectGoods.vue

@@ -1,6 +1,12 @@
 <template>
-  <el-dialog width="980px" title="商品列表" :visible.sync="innerVisible" append-to-body :close-on-click-modal="false"
-    @close="$emit('close')">
+  <el-dialog
+    width="980px"
+    title="商品列表"
+    :visible.sync="innerVisible"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="$emit('close')"
+  >
     <div class="screen-container">
       <el-form ref="tableScreenForm" :model="tableScreenForm" label-width="70px" size="small" label-position="left">
         <el-row :gutter="20">
@@ -16,9 +22,20 @@
           </el-col>
           <el-col :xs="24" :sm="8" :lg="8">
             <el-form-item label="辅材小类" prop="categoryId">
-              <el-cascader v-model="tableScreenForm.categoryId" placeholder="辅材小类" size="small" :show-all-levels="false"
+              <el-cascader
+                v-model="tableScreenForm.categoryId"
+                placeholder="辅材小类"
+                size="small"
+                :show-all-levels="false"
                 clearable
-                :props="{ options: materialCategoryTree, value: 'categoryId', label: 'categoryName', children: 'child', emitPath: false }">
+                :props="{
+                  options: materialCategoryTree,
+                  value: 'categoryId',
+                  label: 'categoryName',
+                  children: 'child',
+                  emitPath: false
+                }"
+              >
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -40,8 +57,17 @@
         </el-row>
       </el-form>
     </div>
-    <el-table ref="goodsTable" :data="goodsList" :row-key="getRowKeys" height="350" size="mini" border
-      header-cell-class-name="headerRowColor" style="width: 100%" @selection-change="handleChooseGoods">
+    <el-table
+      ref="goodsTable"
+      :data="goodsList"
+      :row-key="getRowKeys"
+      height="350"
+      size="mini"
+      border
+      header-cell-class-name="headerRowColor"
+      style="width: 100%"
+      @selection-change="handleChooseGoods"
+    >
       <el-table-column type="selection" width="55" :reserve-selection="true" :selectable="selectable" />
       <el-table-column prop="parentCategoryName" label="大类类名称" />
       <el-table-column prop="categoryName" label="小类名称" />
@@ -52,8 +78,14 @@
     </el-table>
     <div class="pagination clearfix" style="margin-top: 20px">
       <div class="fr">
-        <el-pagination :current-page="table_currentPage" :page-size="table_pageSize" background
-          layout="prev, pager, next" :total="table_listTotal" @current-change="handleTableCurrentChange" />
+        <el-pagination
+          :current-page="table_currentPage"
+          :page-size="table_pageSize"
+          background
+          layout="prev, pager, next"
+          :total="table_listTotal"
+          @current-change="handleTableCurrentChange"
+        />
       </div>
     </div>
     <div slot="footer" class="dialog-footer">
@@ -64,9 +96,7 @@
 
 <script>
 import { materialCategoryTree } from '@/api/auxiliaryMaterialClass'
-import {
-  newGetList,
-} from "@/api/masterAuxiliaryMaterials"
+import { newGetList } from '@/api/masterAuxiliaryMaterials'
 export default {
   props: {
     guolvList: {
@@ -78,11 +108,11 @@ export default {
     return {
       innerVisible: true,
       tableScreenForm: {
-        goodsId: "",
-        goodsName: "",
-        goodsCode: "",
-        categoryId: "",
-        goodsSpecification: ""
+        goodsId: '',
+        goodsName: '',
+        goodsCode: '',
+        categoryId: '',
+        goodsSpecification: ''
       },
       goodsList: [],
       table_currentPage: 1,
@@ -94,11 +124,11 @@ export default {
   },
   created() {
     // 获取小类筛选
-    materialCategoryTree({ state: 'ON' }).then((res2) => {
+    materialCategoryTree({ state: 'ON' }).then(res2 => {
       this.materialCategoryTree = res2.data.filter(item => item.child && item.child.length > 0)
     })
     // 获取列表数据
-    this.getGoodsList();
+    this.getGoodsList()
   },
   methods: {
     selectable(row, index) {
@@ -107,19 +137,51 @@ export default {
     // 获取商品列表
     getGoodsList() {
       newGetList({
-        "pageNum": this.table_currentPage,
-        "pageSize": this.table_pageSize,
-        "params": [
-          ...(() => { if (this.tableScreenForm.goodsId) { return [{ "param": "a.goods_id", "compare": "like", "value": this.tableScreenForm.goodsId }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.goodsName) { return [{ "param": "a.goods_name", "compare": "like", "value": this.tableScreenForm.goodsName }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.goodsCode) { return [{ "param": "a.goods_code", "compare": "like", "value": this.tableScreenForm.goodsCode }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.goodsSpecification) { return [{ "param": "a.goods_specification", "compare": "like", "value": this.tableScreenForm.goodsSpecification }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.categoryId) { return [{ "param": "b.category_id", "compare": "=", "value": this.tableScreenForm.categoryId }] } else { return [] } })(),
+        pageNum: this.table_currentPage,
+        pageSize: this.table_pageSize,
+        params: [
+          ...(() => {
+            if (this.tableScreenForm.goodsId) {
+              return [{ param: 'a.goods_id', compare: 'like', value: this.tableScreenForm.goodsId }]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.goodsName) {
+              return [{ param: 'a.goods_name', compare: 'like', value: this.tableScreenForm.goodsName }]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.goodsCode) {
+              return [{ param: 'a.goods_code', compare: 'like', value: this.tableScreenForm.goodsCode }]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.goodsSpecification) {
+              return [
+                { param: 'a.goods_specification', compare: 'like', value: this.tableScreenForm.goodsSpecification }
+              ]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.categoryId) {
+              return [{ param: 'b.category_id', compare: '=', value: this.tableScreenForm.categoryId }]
+            } else {
+              return []
+            }
+          })()
         ]
       }).then(res => {
-        this.goodsList = res.data.records;
-        this.table_listTotal = res.data.total;
-      });
+        this.goodsList = res.data.records
+        this.table_listTotal = res.data.total
+      })
     },
     // 搜索
     getGoodsListByScreen() {
@@ -128,18 +190,18 @@ export default {
     // 更改列表当前页
     handleTableCurrentChange(val) {
       if (this.table_chooseGoods.length > 0) {
-        return this.$errorMsg("当前已选择商品");
+        return this.$errorMsg('当前已选择商品')
       }
-      this.table_currentPage = val;
-      this.getGoodsList();
+      this.table_currentPage = val
+      this.getGoodsList()
     },
     // id
     getRowKeys(row) {
-      return row.goodsId;
+      return row.goodsId
     },
     // table点击选择商品
     handleChooseGoods(val) {
-      this.table_chooseGoods = val;
+      this.table_chooseGoods = val
     },
     selGoods() {
       console.log(this.table_chooseGoods)

+ 198 - 137
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryMaterialClass/index.vue

@@ -1,78 +1,126 @@
 <template>
-	<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title+'-列表', essential: true }]">
-		<template slot-scope="{activeKey, data}">
-			<div v-if="activeKey == 'list'" class="app-container">
-				<div class="mymain-container">
-				  <div class="btn-group clearfix">
-				    <div class="fl">
-				      <el-button v-if="$restrict('add')" size="small" type="primary" icon="el-icon-plus"
-				        @click="openForm('add1')">添加</el-button>
-				    </div>
-				  </div>
-				  <div class="table">
-				    <el-table :data="dataList" row-key="categoryId" border default-expand-all :tree-props="{ children: 'child' }">
-				      <el-table-column prop="categoryName" label="分类名称" min-width="150"></el-table-column>
-				      <el-table-column align="center" label="状态" class-name="status-col">
-				        <template slot-scope="scope">
-				          <el-tag :type="scope.row.status ? 'success' : 'danger'">{{ ({ ON: '启用', OFF: '禁用' })[scope.row.status]
-				          }}</el-tag>
-				        </template>
-				      </el-table-column>
-				      <el-table-column align="center" prop="sort" label="排序"></el-table-column>
-				      <el-table-column align="right" label="操作" width="120" fixed="right">
-				        <template slot-scope="scope">
-				          <el-button v-if="scope.row.parentCategoryId == 0 && $restrict('add')" type="primary" size="mini"
-				            icon="el-icon-plus" @click="openForm('add2',scope.row)"></el-button>
-				          <el-button v-if="$restrict('edit')" type="primary" size="mini" icon="el-icon-edit"
-				            @click="openForm(scope.row.parentCategoryId == 0?'edit1':'edit2',scope.row)"></el-button>
-				        </template>
-				      </el-table-column>
-				    </el-table>
-				  </div>
-				</div>
-			</div>
-			<div v-if="~['add1', 'add2', 'edit1', 'edit2'].indexOf(activeKey)">
-				<zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-				  <zj-form-module :title="formDialogTitles[formDialogType]" label-width="100px" :showPackUp="false"
-				    :form-data="formData" :form-items="formItems">
-				  </zj-form-module>
-				</zj-form-container>
-				<div slot="footer" class="dialog-footer">
-				  <el-button size="mini" @click="formCancel;data.removeTab()">取 消</el-button>
-				  <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
-				</div>
-			</div>
-		</template>
-	</zj-tab-page>
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+    <template slot-scope="{ activeKey, data }">
+      <div v-if="activeKey == 'list'" class="app-container">
+        <div class="mymain-container">
+          <div class="btn-group clearfix">
+            <div class="fl">
+              <el-button
+                v-if="$restrict('add')"
+                size="small"
+                type="primary"
+                icon="el-icon-plus"
+                @click="openForm('add1')"
+                >添加</el-button
+              >
+            </div>
+          </div>
+          <div class="table">
+            <el-table
+              :data="dataList"
+              row-key="categoryId"
+              border
+              default-expand-all
+              :tree-props="{ children: 'child' }"
+            >
+              <el-table-column prop="categoryName" label="分类名称" min-width="150"></el-table-column>
+              <el-table-column align="center" label="状态" class-name="status-col">
+                <template slot-scope="scope">
+                  <el-tag :type="scope.row.status ? 'success' : 'danger'">{{
+                    { ON: '启用', OFF: '禁用' }[scope.row.status]
+                  }}</el-tag>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" prop="sort" label="排序"></el-table-column>
+              <el-table-column align="right" label="操作" width="120" fixed="right">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.parentCategoryId == 0 && $restrict('add')"
+                    type="primary"
+                    size="mini"
+                    icon="el-icon-plus"
+                    @click="openForm('add2', scope.row)"
+                  ></el-button>
+                  <el-button
+                    v-if="$restrict('edit')"
+                    type="primary"
+                    size="mini"
+                    icon="el-icon-edit"
+                    @click="openForm(scope.row.parentCategoryId == 0 ? 'edit1' : 'edit2', scope.row)"
+                  ></el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </div>
+      <div v-if="~['add1', 'add2', 'edit1', 'edit2'].indexOf(activeKey)">
+        <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+          <zj-form-module
+            :title="formDialogTitles[formDialogType]"
+            label-width="100px"
+            :showPackUp="false"
+            :form-data="formData"
+            :form-items="formItems"
+          >
+          </zj-form-module>
+        </zj-form-container>
+        <div slot="footer" class="dialog-footer">
+          <el-button
+            size="mini"
+            @click="
+              formCancel
+              data.removeTab()
+            "
+            >取 消</el-button
+          >
+          <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
+        </div>
+      </div>
+    </template>
+  </zj-tab-page>
 </template>
 
 <script>
 import { getToken } from '@/utils/auth'
-import { getClassifyList, addClassify, editClassify, deleteClassify, getClassifyDetail, getSmallType } from '@/api/goods'
-import { ORDER_MAIN_TYPE } from "@/utils/select_data";
-import { materialCategoryList, materialCategoryAdd, materialCategoryUpdate, materialCategoryTree } from "@/api/auxiliaryMaterialClass";
+import {
+  getClassifyList,
+  addClassify,
+  editClassify,
+  deleteClassify,
+  getClassifyDetail,
+  getSmallType
+} from '@/api/goods'
+import { ORDER_MAIN_TYPE } from '@/utils/select_data'
+import {
+  materialCategoryList,
+  materialCategoryAdd,
+  materialCategoryUpdate,
+  materialCategoryTree
+} from '@/api/auxiliaryMaterialClass'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 export default {
   data() {
     return {
       dataList: [], // 列表数据
-      screenForm: { // 筛选表单数据
-        keyword: '', // 关键词
+      screenForm: {
+        // 筛选表单数据
+        keyword: '' // 关键词
       },
       formDialogType: 0,
-      formDialogTitles: ["新增", "编辑"],
+      formDialogTitles: ['新增', '编辑'],
       formDialog: false,
       formData: {
         companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
-        status: "ON",
-        parentCategoryId: "",
-        categoryName: "",
-        sort: "",
+        status: 'ON',
+        parentCategoryId: '',
+        categoryName: '',
+        sort: '',
         categoryLevel: 2
       },
       materialCategoryList: [],
-			formType: 'add',
-			formVisible: false,
+      formType: 'add',
+      formVisible: false
     }
   },
   computed: {
@@ -95,30 +143,34 @@ export default {
         },
         ...(() => {
           if (this.formData.categoryLevel == 2) {
-            return [{
-              md: 6,
-              isShow: true,
-              name: 'el-select',
-              options: [...this.materialCategoryList, { categoryName: "无", categoryId: "0" }],
-              labelKey: "categoryName",
-              valueKey: "categoryId",
-              attributes: { placeholder: '请输入', disabled: this.formDialogType != 0 },
-              formItemAttributes: {
-                label: '父级分类',
-                prop: 'parentCategoryId',
-                rules: []
-              },
-              events: {
-                change: (val) => {
-                  if (val && val != 0) {
-                    this.formData.parentCategoryName = this.materialCategoryList.find(item => item.categoryId == val).categoryName
-                  } else {
-                    this.formData.parentCategoryName = ""
+            return [
+              {
+                md: 6,
+                isShow: true,
+                name: 'el-select',
+                options: [...this.materialCategoryList, { categoryName: '无', categoryId: '0' }],
+                labelKey: 'categoryName',
+                valueKey: 'categoryId',
+                attributes: { placeholder: '请输入', disabled: this.formDialogType != 0 },
+                formItemAttributes: {
+                  label: '父级分类',
+                  prop: 'parentCategoryId',
+                  rules: []
+                },
+                events: {
+                  change: val => {
+                    if (val && val != 0) {
+                      this.formData.parentCategoryName = this.materialCategoryList.find(
+                        item => item.categoryId == val
+                      ).categoryName
+                    } else {
+                      this.formData.parentCategoryName = ''
+                    }
+                    console.log(val)
                   }
-                  console.log(val)
                 }
               }
-            }]
+            ]
           }
           return []
         })(),
@@ -132,18 +184,23 @@ export default {
             prop: 'categoryName',
             rules: [...required]
           }
-        }, {
+        },
+        {
           md: 6,
           isShow: true,
           name: 'el-radio',
-          options: [{ label: "启用", value: "ON" }, { label: "禁用", value: "OFF" }],
+          options: [
+            { label: '启用', value: 'ON' },
+            { label: '禁用', value: 'OFF' }
+          ],
           attributes: {},
           formItemAttributes: {
             label: '状态',
             prop: 'status',
             rules: [...required]
-          },
-        }, {
+          }
+        },
+        {
           md: 6,
           isShow: true,
           name: 'el-input',
@@ -153,61 +210,66 @@ export default {
             prop: 'sort',
             rules: []
           }
-        },
+        }
       ]
     }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
-
     getList() {
       materialCategoryTree().then(res => {
         this.dataList = res.data
       })
     },
-    openForm(type,row) {
-		this.$refs.tabPage.addTab({
-			// 对应显示的模块
-			activeKey: type,
-			// 唯一标识
-			key: type,
-			// 页签名称
-			label: ({ edit1: "编辑一级分类", add1: "添加一级分类", edit2: "编辑二级分类", add2: "添加二级分类" })[type],
-			// 打开时事件
-			triggerEvent: () => {
-				
-				this.$nextTick(()=>{
-					this.formType = type
-					this.formVisible = true
-					Promise.all([
-					  materialCategoryList({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.category_level", "compare": "=", "value": "1" }] })
-					]).then(([res1]) => {
-					  this.materialCategoryList = res1.data.records
-					  this.formDialog = true;
-					})
-					if(type == 'add1'){
-						this.formDialogType = 0
-					}else if(type == 'add2'){
-						this.formDialogType = 0
-						Object.assign(this.formData, {
-						  parentCategoryId: row.categoryId
-						})
-					}else if(type == 'edit1'){
-						Object.assign(this.formData, row)
-						this.formDialogType = 1
-					}else if(type == 'edit2'){
-						Object.assign(this.formData, row)
-						this.formDialogType = 1
-					}
-				})
-			},
-			// 关闭时事件
-			closeEvent: () => {
-				this.formCancel()
-			}
-		})
+    openForm(type, row) {
+      this.$refs.tabPage.addTab({
+        // 对应显示的模块
+        activeKey: type,
+        // 唯一标识
+        key: type,
+        // 页签名称
+        label: { edit1: '编辑一级分类', add1: '添加一级分类', edit2: '编辑二级分类', add2: '添加二级分类' }[type],
+        // 打开时事件
+        triggerEvent: () => {
+          this.$nextTick(() => {
+            this.formType = type
+            this.formVisible = true
+            Promise.all([
+              materialCategoryList({
+                pageNum: 1,
+                pageSize: -1,
+                params: [
+                  { param: 'a.status', compare: '=', value: 'ON' },
+                  { param: 'a.category_level', compare: '=', value: '1' }
+                ]
+              })
+            ]).then(([res1]) => {
+              this.materialCategoryList = res1.data.records
+              this.formDialog = true
+            })
+            if (type == 'add1') {
+              this.formDialogType = 0
+            } else if (type == 'add2') {
+              this.formDialogType = 0
+              Object.assign(this.formData, {
+                parentCategoryId: row.categoryId
+              })
+            } else if (type == 'edit1') {
+              Object.assign(this.formData, row)
+              this.formDialogType = 1
+            } else if (type == 'edit2') {
+              Object.assign(this.formData, row)
+              this.formDialogType = 1
+            }
+          })
+        },
+        // 关闭时事件
+        closeEvent: () => {
+          this.formCancel()
+        }
+      })
     },
     formCancel() {
       this.formVisible = false
@@ -217,22 +279,21 @@ export default {
     formConfirm(cancel) {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([materialCategoryAdd, materialCategoryUpdate][this.formDialogType])({
-            ...this.formData,
-            categoryLevel: !this.formData.parentCategoryId || this.formData.parentCategoryId == 0 ? 1 : 2
-          }).then(res => {
-            this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
-            cancel('list')
-            this.getList();
-          })
+          ;[materialCategoryAdd, materialCategoryUpdate]
+            [this.formDialogType]({
+              ...this.formData,
+              categoryLevel: !this.formData.parentCategoryId || this.formData.parentCategoryId == 0 ? 1 : 2
+            })
+            .then(res => {
+              this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
+              cancel('list')
+              this.getList()
+            })
         }
       })
     }
-
   }
-
 }
-
 </script>
 
 <style scoped lang="scss"></style>

+ 102 - 57
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryMaterialClass/index_cp.vue

@@ -1,12 +1,34 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation">
-    <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
-      :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :operation="operation"
+  >
+    <el-dialog
+      title=""
+      width="500px"
+      custom-class="diy-dialog"
+      append-to-body
+      :modal="true"
+      :visible.sync="formDialog"
+      :show-close="true"
+      :close-on-click-modal="false"
+      :modal-append-to-body="false"
+      :before-close="formCancel"
+    >
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-        <zj-form-module :title="formDialogTitles[formDialogType]" label-width="100px" :showPackUp="false"
-          :form-data="formData" :form-items="formItems">
+        <zj-form-module
+          :title="formDialogTitles[formDialogType]"
+          label-width="100px"
+          :showPackUp="false"
+          :form-data="formData"
+          :form-items="formItems"
+        >
         </zj-form-module>
       </zj-form-container>
       <div slot="footer" class="dialog-footer">
@@ -21,7 +43,7 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
-import { materialCategoryList, materialCategoryAdd, materialCategoryUpdate } from "@/api/auxiliaryMaterialClass";
+import { materialCategoryList, materialCategoryAdd, materialCategoryUpdate } from '@/api/auxiliaryMaterialClass'
 export default {
   components: { TemplatePage },
   mixins: [import_mixin],
@@ -36,8 +58,8 @@ export default {
               isRole: true,
               click: this.addData
             }
-          ],
-        ],
+          ]
+        ]
       ],
       // 表格属性
       tableAttributes: {
@@ -52,14 +74,14 @@ export default {
       recordSelected: [],
       /** 表单变量 */
       formDialogType: 0,
-      formDialogTitles: ["新增", "编辑"],
+      formDialogTitles: ['新增', '编辑'],
       formDialog: false,
       formData: {
         companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
-        status: "ON",
-        parentCategoryId: "",
-        categoryName: "",
-        sort: "",
+        status: 'ON',
+        parentCategoryId: '',
+        categoryName: '',
+        sort: '',
         categoryLevel: 2
       },
       materialCategoryList: []
@@ -85,30 +107,34 @@ export default {
         },
         ...(() => {
           if (this.formData.categoryLevel == 2) {
-            return [{
-              md: 24,
-              isShow: true,
-              name: 'el-select',
-              options: [...this.materialCategoryList, { categoryName: "无", categoryId: "0" }],
-              labelKey: "categoryName",
-              valueKey: "categoryId",
-              attributes: { placeholder: '请输入', disabled: this.formDialogType != 0 },
-              formItemAttributes: {
-                label: '父级分类',
-                prop: 'parentCategoryId',
-                rules: []
-              },
-              events: {
-                change: (val) => {
-                  if (val && val != 0) {
-                    this.formData.parentCategoryName = this.materialCategoryList.find(item => item.categoryId == val).categoryName
-                  } else {
-                    this.formData.parentCategoryName = ""
+            return [
+              {
+                md: 24,
+                isShow: true,
+                name: 'el-select',
+                options: [...this.materialCategoryList, { categoryName: '无', categoryId: '0' }],
+                labelKey: 'categoryName',
+                valueKey: 'categoryId',
+                attributes: { placeholder: '请输入', disabled: this.formDialogType != 0 },
+                formItemAttributes: {
+                  label: '父级分类',
+                  prop: 'parentCategoryId',
+                  rules: []
+                },
+                events: {
+                  change: val => {
+                    if (val && val != 0) {
+                      this.formData.parentCategoryName = this.materialCategoryList.find(
+                        item => item.categoryId == val
+                      ).categoryName
+                    } else {
+                      this.formData.parentCategoryName = ''
+                    }
+                    console.log(val)
                   }
-                  console.log(val)
                 }
               }
-            }]
+            ]
           }
           return []
         })(),
@@ -122,18 +148,23 @@ export default {
             prop: 'categoryName',
             rules: [...required]
           }
-        }, {
+        },
+        {
           md: 24,
           isShow: true,
           name: 'el-radio',
-          options: [{ label: "启用", value: "ON" }, { label: "禁用", value: "OFF" }],
+          options: [
+            { label: '启用', value: 'ON' },
+            { label: '禁用', value: 'OFF' }
+          ],
           attributes: {},
           formItemAttributes: {
             label: '状态',
             prop: 'status',
             rules: [...required]
-          },
-        }, {
+          }
+        },
+        {
           md: 24,
           isShow: true,
           name: 'el-input',
@@ -143,7 +174,7 @@ export default {
             prop: 'sort',
             rules: []
           }
-        },
+        }
       ]
     }
   },
@@ -161,12 +192,17 @@ export default {
     // 表格操作列
     operation(h, { row, index, column }) {
       return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 1
-            this.openForm()
-          }}>编辑</el-button>
+        <div class="operation-btns">
+          <el-button
+            type="text"
+            onClick={() => {
+              Object.assign(this.formData, row)
+              this.formDialogType = 1
+              this.openForm()
+            }}
+          >
+            编辑
+          </el-button>
         </div>
       )
     },
@@ -176,10 +212,17 @@ export default {
     },
     openForm() {
       Promise.all([
-        materialCategoryList({ "pageNum": 1, "pageSize": -1, "params": [{"param":"a.status","compare":"=","value":"ON"},{ "param": "a.category_level", "compare": "=", "value": "1" }] })
+        materialCategoryList({
+          pageNum: 1,
+          pageSize: -1,
+          params: [
+            { param: 'a.status', compare: '=', value: 'ON' },
+            { param: 'a.category_level', compare: '=', value: '1' }
+          ]
+        })
       ]).then(([res1]) => {
         this.materialCategoryList = res1.data.records
-        this.formDialog = true;
+        this.formDialog = true
       })
     },
     formCancel() {
@@ -190,14 +233,16 @@ export default {
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([materialCategoryAdd, materialCategoryUpdate][this.formDialogType])({
-            ...this.formData,
-            categoryLevel: !this.formData.parentCategoryId || this.formData.parentCategoryId == 0 ? 1 : 2
-          }).then(res => {
-            this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
-            this.formCancel()
-            this.$refs.pageRef.refreshList()
-          })
+          ;[materialCategoryAdd, materialCategoryUpdate]
+            [this.formDialogType]({
+              ...this.formData,
+              categoryLevel: !this.formData.parentCategoryId || this.formData.parentCategoryId == 0 ? 1 : 2
+            })
+            .then(res => {
+              this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
+              this.formCancel()
+              this.$refs.pageRef.refreshList()
+            })
         }
       })
     }

+ 313 - 263
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryPriceManagement/index.vue

@@ -1,32 +1,55 @@
 <template>
-	<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title+'-列表', essential: true }]">
-		<template slot-scope="{activeKey, data}">
-			<template-page v-if="activeKey == 'list'" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-			  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-			  :operation="operation()" :exportList="exportList" :operationColumnWidth="80">
-			</template-page>
-			<div v-if="~['add', 'edit'].indexOf(activeKey)">
-				<zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-				  <zj-form-module title="" label-width="120px" :showPackUp="false"
-				    :form-data="formData" :form-items="formItems">
-				  </zj-form-module>
-				</zj-form-container>
-				<div slot="footer" class="dialog-footer">
-				  <el-button size="mini" @click="data.removeTab()">取 消</el-button>
-				  <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
-				</div>
-			</div>
-		</template>
-	</zj-tab-page>
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+    <template slot-scope="{ activeKey, data }">
+      <template-page
+        v-if="activeKey == 'list'"
+        ref="pageRef"
+        :get-list="getList"
+        :table-attributes="tableAttributes"
+        :table-events="tableEvents"
+        :options-evens-group="optionsEvensGroup"
+        :moreParameters="moreParameters"
+        :column-parsing="columnParsing"
+        :operation="operation()"
+        :exportList="exportList"
+        :operationColumnWidth="80"
+      >
+      </template-page>
+      <div v-if="~['add', 'edit'].indexOf(activeKey)">
+        <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+          <zj-form-module
+            title=""
+            label-width="120px"
+            :showPackUp="false"
+            :form-data="formData"
+            :form-items="formItems"
+          >
+          </zj-form-module>
+        </zj-form-container>
+        <div slot="footer" class="dialog-footer">
+          <el-button size="mini" @click="data.removeTab()">取 消</el-button>
+          <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
+        </div>
+      </div>
+    </template>
+  </zj-tab-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
-import { websitGoodsmImport, materialNormList, materialNormListExport, materialNormAdd, materialNormEdit, materialNormDetail, materialNormBatchUpdateStatus } from "@/api/auxiliaryPriceManagement";
-import { materialCategoryTree } from "@/api/auxiliaryMaterialClass";
-import { getTypeList } from "@/api/auxiliaryFittings/attachmentProfile";
+import {
+  websitGoodsmImport,
+  materialNormList,
+  materialNormListExport,
+  materialNormAdd,
+  materialNormEdit,
+  materialNormDetail,
+  materialNormBatchUpdateStatus
+} from '@/api/auxiliaryPriceManagement'
+import { materialCategoryTree } from '@/api/auxiliaryMaterialClass'
+import { getTypeList } from '@/api/auxiliaryFittings/attachmentProfile'
 import { commonTemplateDownload } from '@/api/common.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
@@ -34,55 +57,55 @@ export default {
   mixins: [import_mixin, operation_mixin],
   data() {
     return {
-		// 表格属性
-		tableAttributes: {
-			// 启用勾选列
-			selectColumn: true
-		},
-		// 表格事件
-		tableEvents: {
-			'selection-change': this.selectionChange
-		},
-		// 勾选选中行
-		recordSelected: [],
-		/** 表单变量 */
-		formDialogType: 0,
-		formDialogTitles: ["新增", "编辑"],
-		formDialog: false,
-		formData: {
-			companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
-			"convertBitScale": "",
-			"cost": "",
-			"createBy": "",
-			"createTime": "",
-			"goodsBarcodeId": "",
-			"goodsCategoryId": "",
-			"goodsCode": "",
-			"goodsId": "",
-			"goodsImage": "",
-			"goodsName": "",
-			"goodsSalesConvertQty": "",
-			"goodsSalesUnit": "",
-			"goodsSpecification": "",
-			"goodsSpell": "",
-			"goodsStockUnit": "",
-			"goodsType": "M",
-			"manageWorkerStock": "",
-			"marketPrice": "",
-			"normAmount": "",
-			"normType": "",
-			"outWebsitAmount": "",
-			"outWorkerAmount": "",
-			"parentCategoryId": "",
-			"remark": "",
-			"selfWebsitAmount": "",
-			"selfWorkerAmount": "",
-			"status": "ON",
-		},
-		partsUnitList: [],
-		materialCategoryTree: [],
-		formType: 'add',
-		formVisible: false,
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ['新增', '编辑'],
+      formDialog: false,
+      formData: {
+        companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+        convertBitScale: '',
+        cost: '',
+        createBy: '',
+        createTime: '',
+        goodsBarcodeId: '',
+        goodsCategoryId: '',
+        goodsCode: '',
+        goodsId: '',
+        goodsImage: '',
+        goodsName: '',
+        goodsSalesConvertQty: '',
+        goodsSalesUnit: '',
+        goodsSpecification: '',
+        goodsSpell: '',
+        goodsStockUnit: '',
+        goodsType: 'M',
+        manageWorkerStock: '',
+        marketPrice: '',
+        normAmount: '',
+        normType: '',
+        outWebsitAmount: '',
+        outWorkerAmount: '',
+        parentCategoryId: '',
+        remark: '',
+        selfWebsitAmount: '',
+        selfWorkerAmount: '',
+        status: 'ON'
+      },
+      partsUnitList: [],
+      materialCategoryTree: [],
+      formType: 'add',
+      formVisible: false
     }
   },
   computed: {
@@ -91,18 +114,18 @@ export default {
       return [
         [
           [
-            this.optionsEvensAuth("add", {
-				click: () => {
-					this.openForm('add')
-				}
-            }),
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.openForm('add')
+              }
+            })
           ],
           [
-            this.optionsEvensAuth(["imp", "template"], {
+            this.optionsEvensAuth(['imp', 'template'], {
               name: '导入辅材',
-              click: () => { }
+              click: () => {}
             }),
-            this.optionsEvensAuth("imp", ({ moduleName }) => {
+            this.optionsEvensAuth('imp', ({ moduleName }) => {
               return {
                 name: moduleName,
                 render: () => {
@@ -110,7 +133,7 @@ export default {
                 }
               }
             }),
-            this.optionsEvensAuth("template", {
+            this.optionsEvensAuth('template', {
               click: () => {
                 commonTemplateDownload({ name: '辅材模板.xlsx' }, `辅材模板`)
                   .then(res => {
@@ -123,37 +146,37 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }),
-          ],
+            })
+          ]
         ],
         [
           [
-            this.optionsEvensAuth("batchLaunch", {
+            this.optionsEvensAuth('batchLaunch', {
               click: () => {
                 if (this.recordSelected.length) {
-                  this.setRowStatus("ON")
+                  this.setRowStatus('ON')
                 } else {
                   this.$message({
                     type: 'warning',
-                    message: `请先勾选需要设置的数据!`,
-                  });
+                    message: `请先勾选需要设置的数据!`
+                  })
                 }
               }
-            }),
+            })
           ],
           [
-            this.optionsEvensAuth("batchRemoval", {
+            this.optionsEvensAuth('batchRemoval', {
               click: () => {
                 if (this.recordSelected.length) {
-                  this.setRowStatus("OFF")
+                  this.setRowStatus('OFF')
                 } else {
                   this.$message({
                     type: 'warning',
-                    message: `请先勾选需要设置的数据!`,
-                  });
+                    message: `请先勾选需要设置的数据!`
+                  })
                 }
               }
-            }),
+            })
           ]
         ]
       ]
@@ -163,137 +186,157 @@ export default {
       return []
     },
     formItems() {
-      return [{
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', disabled: true },
-        formItemAttributes: {
-          label: '所属商户',
-          prop: 'companyWechatName',
-          rules: [...required]
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-radio',
-        options: [{ label: "上架", value: "ON" }, { label: "下架", value: "OFF" }],
-        attributes: {},
-        formItemAttributes: {
-          label: '状态',
-          prop: 'status',
-          rules: [...required]
+      return [
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', disabled: true },
+          formItemAttributes: {
+            label: '所属商户',
+            prop: 'companyWechatName',
+            rules: [...required]
+          }
         },
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-cascader',
-        attributes: { style: "width:100%", placeholder: '请输入', options: this.materialCategoryTree, 'show-all-levels': false, props: { value: "categoryId", label: "categoryName", children: "child", emitPath: false }, clearable: true },
-        formItemAttributes: {
-          label: '选择分类',
-          prop: 'goodsCategoryId',
-          rules: [...required]
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-radio',
+          options: [
+            { label: '上架', value: 'ON' },
+            { label: '下架', value: 'OFF' }
+          ],
+          attributes: {},
+          formItemAttributes: {
+            label: '状态',
+            prop: 'status',
+            rules: [...required]
+          }
         },
-        events: {
-          change: (val) => {
-            this.$refs.formRef.validateField(["goodsCategoryId"], (valid, invalidFields, errLabels) => { })
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-cascader',
+          attributes: {
+            style: 'width:100%',
+            placeholder: '请输入',
+            options: this.materialCategoryTree,
+            'show-all-levels': false,
+            props: { value: 'categoryId', label: 'categoryName', children: 'child', emitPath: false },
+            clearable: true
+          },
+          formItemAttributes: {
+            label: '选择分类',
+            prop: 'goodsCategoryId',
+            rules: [...required]
+          },
+          events: {
+            change: val => {
+              this.$refs.formRef.validateField(['goodsCategoryId'], (valid, invalidFields, errLabels) => {})
+            }
           }
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '辅材名称',
-          prop: 'goodsName',
-          rules: [...required]
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-select-add',
-        labelKey: 'dictValue',
-        valueKey: 'dictValue',
-        options: this.partsUnitList,
-        attributes: { placeholder: '请选择单位', filterable: true, clearable: true },
-        formItemAttributes: {
-          label: '单位',
-          prop: 'goodsStockUnit',
-          rules: [...required]
         },
-        events: {
-          change: (val) => {
-            this.$refs.formRef.validateField(["goodsStockUnit"], (valid, invalidFields, errLabels) => { })
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '辅材名称',
+            prop: 'goodsName',
+            rules: [...required]
           }
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '商品代码',
-          prop: 'goodsCode',
-          rules: []
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '规格型号',
-          prop: 'goodsSpecification',
-          rules: []
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "number" },
-        formItemAttributes: {
-          label: '采购价格',
-          prop: 'cost',
-          rules: []
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "number" },
-        formItemAttributes: {
-          label: '销售价格',
-          prop: 'marketPrice',
-          rules: [...required]
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'slot-component',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '',
-          prop: '',
-          'label-width': "0px"
         },
-        render: (h, { props, onInput }) => {
-          var { value } = props
-          return (
-            <div style="color:red">注:销售价格即网点销售给师傅的辅材价格</div>
-          )
-        }
-      }, {
-        md: 24,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "textarea" },
-        formItemAttributes: {
-          label: '备注',
-          prop: 'remark',
-          rules: []
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-select-add',
+          labelKey: 'dictValue',
+          valueKey: 'dictValue',
+          options: this.partsUnitList,
+          attributes: { placeholder: '请选择单位', filterable: true, clearable: true },
+          formItemAttributes: {
+            label: '单位',
+            prop: 'goodsStockUnit',
+            rules: [...required]
+          },
+          events: {
+            change: val => {
+              this.$refs.formRef.validateField(['goodsStockUnit'], (valid, invalidFields, errLabels) => {})
+            }
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '商品代码',
+            prop: 'goodsCode',
+            rules: []
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '规格型号',
+            prop: 'goodsSpecification',
+            rules: []
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'number' },
+          formItemAttributes: {
+            label: '采购价格',
+            prop: 'cost',
+            rules: []
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'number' },
+          formItemAttributes: {
+            label: '销售价格',
+            prop: 'marketPrice',
+            rules: [...required]
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'slot-component',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return <div style="color:red">注:销售价格即网点销售给师傅的辅材价格</div>
+          }
+        },
+        {
+          md: 24,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'textarea' },
+          formItemAttributes: {
+            label: '备注',
+            prop: 'remark',
+            rules: []
+          }
         }
-      }]
+      ]
     }
   },
   methods: {
@@ -311,52 +354,59 @@ export default {
     },
 
     operation() {
-		return this.operationBtn({
-			edit: {
-				click: ({ row, index, column }) => {
-					this.openForm('edit',row.goodsId)
-				}
-			},
-		})
-	},
-	openForm(type, id) {
-		this.$refs.tabPage.addTab({
-			// 对应显示的模块
-			activeKey: type,
-			// 唯一标识
-			key: type,
-			// 页签名称
-			label: ({ edit: "编辑", add: "新增" })[type],
-			// 打开时事件
-			triggerEvent: () => {
-				this.formCancel()
-				this.$nextTick(()=>{
-					this.formType = type
-					this.formVisible = true
-					Promise.all([
-					  getTypeList({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.dict_type", "compare": "=", "value": `ASSIST_UNIT` }, { "param": "a.status", "compare": "=", "value": "ON" }] }),
-					  materialCategoryTree({ state: "ON" })
-					]).then(([res1, res2]) => {
-					  this.partsUnitList = res1.data.records
-					  this.materialCategoryTree = res2.data.filter(item => (item.child && item.child.length > 0))
-					  this.formDialog = true;
-					})
-					if (type == 'add') {
-						this.formDialogType = 0
-					} else if(type == 'edit'){
-						this.formDialogType = 1
-						materialNormDetail({ id }).then(res => {
-						  Object.assign(this.formData, res.data)
-						})
-					}
-				})
-			},
-			// 关闭时事件
-			closeEvent: () => {
-				this.formCancel()
-			}
-		})
-	},
+      return this.operationBtn({
+        edit: {
+          click: ({ row, index, column }) => {
+            this.openForm('edit', row.goodsId)
+          }
+        }
+      })
+    },
+    openForm(type, id) {
+      this.$refs.tabPage.addTab({
+        // 对应显示的模块
+        activeKey: type,
+        // 唯一标识
+        key: type,
+        // 页签名称
+        label: { edit: '编辑', add: '新增' }[type],
+        // 打开时事件
+        triggerEvent: () => {
+          this.formCancel()
+          this.$nextTick(() => {
+            this.formType = type
+            this.formVisible = true
+            Promise.all([
+              getTypeList({
+                pageNum: 1,
+                pageSize: -1,
+                params: [
+                  { param: 'a.dict_type', compare: '=', value: `ASSIST_UNIT` },
+                  { param: 'a.status', compare: '=', value: 'ON' }
+                ]
+              }),
+              materialCategoryTree({ state: 'ON' })
+            ]).then(([res1, res2]) => {
+              this.partsUnitList = res1.data.records
+              this.materialCategoryTree = res2.data.filter(item => item.child && item.child.length > 0)
+              this.formDialog = true
+            })
+            if (type == 'add') {
+              this.formDialogType = 0
+            } else if (type == 'edit') {
+              this.formDialogType = 1
+              materialNormDetail({ id }).then(res => {
+                Object.assign(this.formData, res.data)
+              })
+            }
+          })
+        },
+        // 关闭时事件
+        closeEvent: () => {
+          this.formCancel()
+        }
+      })
+    },
     formCancel() {
       this.formVisible = false
       this.$refs?.formRef?.resetFields()
@@ -365,7 +415,7 @@ export default {
     formConfirm(cancel) {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([materialNormAdd, materialNormEdit][this.formDialogType])({ ...this.formData, goodsType: "M" }).then(res => {
+          ;[materialNormAdd, materialNormEdit][this.formDialogType]({ ...this.formData, goodsType: 'M' }).then(res => {
             this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
             cancel('list')
             this.$refs.pageRef.refreshList()

+ 140 - 118
src/views/auxiliaryFittings/auxiliaryDataManagement/masterAuxiliaryMaterials/index.vue

@@ -1,12 +1,22 @@
 <template>
   <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
     <template slot-scope="{ activeKey, data }">
-      <template-page v-if="activeKey == 'list'" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
-        :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
-        :column-parsing="columnParsing" :operation="operation()" :exportList="exportList" :operationColumnWidth="80">
+      <template-page
+        v-if="activeKey == 'list'"
+        ref="pageRef"
+        :get-list="getList"
+        :table-attributes="tableAttributes"
+        :table-events="tableEvents"
+        :options-evens-group="optionsEvensGroup"
+        :moreParameters="moreParameters"
+        :column-parsing="columnParsing"
+        :operation="operation()"
+        :exportList="exportList"
+        :operationColumnWidth="80"
+      >
       </template-page>
       <div v-if="~['add', 'edit'].indexOf(activeKey)">
-        <div style="box-sizing: border-box;padding: 20px">
+        <div style="box-sizing: border-box; padding: 20px">
           <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
             <zj-form-module title="编辑" label-width="180px" :form-data="formData" :form-items="formItems">
             </zj-form-module>
@@ -14,25 +24,23 @@
             </zj-form-module>
           </zj-form-container>
         </div>
-        <div slot="footer" style="box-sizing: border-box;padding-bottom: 20px; padding-right: 20px;text-align: right">
+        <div slot="footer" style="box-sizing: border-box; padding-bottom: 20px; padding-right: 20px; text-align: right">
           <el-button size="mini" @click="data.removeTab()">取 消</el-button>
           <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
         </div>
-        <selectGoods v-if="formVisible" @close="close" @confirm="confirm"
-          :guolvList="(formData.items || []).map(item => item.websitGoodsId)" />
+        <selectGoods
+          v-if="formVisible"
+          @close="close"
+          @confirm="confirm"
+          :guolvList="(formData.items || []).map(item => item.websitGoodsId)"
+        />
       </div>
     </template>
   </zj-tab-page>
 </template>
 
 <script>
-import {
-  newGetList,
-  newGetListExport,
-  getDetail,
-  addMaterial,
-  editMaterial
-} from "@/api/masterAuxiliaryMaterials"
+import { newGetList, newGetListExport, getDetail, addMaterial, editMaterial } from '@/api/masterAuxiliaryMaterials'
 import selectGoods from './selectGoods.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
@@ -66,19 +74,19 @@ export default {
         companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
         categoryId: '',
         companyWechatId: '',
-        "goodsCode": "",
-        "goodsId": "",
-        "goodsName": "",
-        "isSmall": true,
-        "items": [],
-        "remark": "",
-        "salesUnit": "",
-        "status": "",
+        goodsCode: '',
+        goodsId: '',
+        goodsName: '',
+        isSmall: true,
+        items: [],
+        remark: '',
+        salesUnit: '',
+        status: ''
       },
       partsUnitList: [],
       materialCategoryTree: [],
       formType: 'add',
-      formVisible: false,
+      formVisible: false
     }
   },
   computed: {
@@ -89,7 +97,7 @@ export default {
           [
             this.optionsEvensAuth('add', {
               click: () => {
-                this.openForm("add");
+                this.openForm('add')
               }
             })
           ]
@@ -98,7 +106,7 @@ export default {
           [
             this.optionsEvensAuth('export2', {
               click: () => {
-                this.exportSheet2();
+                this.exportSheet2()
               }
             })
           ]
@@ -220,86 +228,98 @@ export default {
       ]
     },
     formItems2() {
-      return [{
-        name: 'slot-component',
-        md: 24,
-        formItemAttributes: {
-          'label-width': '0px',
-          label: '',
-          prop: 'items',
-          rules: [...required]
-        },
-        render: (h, { props }) => {
-          return (
-            <div>
+      return [
+        {
+          name: 'slot-component',
+          md: 24,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '',
+            prop: 'items',
+            rules: [...required]
+          },
+          render: (h, { props }) => {
+            return (
               <div>
-                <el-button
-                  size="mini"
-                  type="primary"
-                  onClick={() => {
-                    this.formVisible = true
-                  }}
-                >
-                  新增
-                </el-button>
+                <div>
+                  <el-button
+                    size="mini"
+                    type="primary"
+                    onClick={() => {
+                      this.formVisible = true
+                    }}
+                  >
+                    新增
+                  </el-button>
+                </div>
+                <zj-table
+                  columns={[
+                    {
+                      columnAttributes: {
+                        label: '大类名称',
+                        prop: 'parentCategoryName'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '小类名称',
+                        prop: 'goodsCategoryName'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '辅材名称',
+                        prop: 'websitGoodsName'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '单位',
+                        prop: 'goodsSalesUnit'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '商品代码',
+                        prop: 'goodsCode'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '规格型号',
+                        prop: 'goodsSpecification'
+                      }
+                    },
+                    {
+                      columnAttributes: {
+                        label: '操作',
+                        prop: ''
+                      },
+                      render: (h, { row, column, index }) => {
+                        return (
+                          <div style="padding: 0 10px">
+                            <el-button
+                              size="mini"
+                              type="text"
+                              onClick={() => {
+                                this.formData.items.splice(index, 1)
+                              }}
+                            >
+                              删除
+                            </el-button>
+                          </div>
+                        )
+                      }
+                    }
+                  ]}
+                  table-data={this.formData.items || []}
+                />
               </div>
-              <zj-table columns={[{
-                columnAttributes: {
-                  label: '大类名称',
-                  prop: 'parentCategoryName',
-                }
-              },
-              {
-                columnAttributes: {
-                  label: '小类名称',
-                  prop: 'goodsCategoryName',
-                }
-              }, {
-                columnAttributes: {
-                  label: '辅材名称',
-                  prop: 'websitGoodsName',
-                }
-              }, {
-                columnAttributes: {
-                  label: '单位',
-                  prop: 'goodsSalesUnit',
-                }
-              }, {
-                columnAttributes: {
-                  label: '商品代码',
-                  prop: 'goodsCode',
-                }
-              }, {
-                columnAttributes: {
-                  label: '规格型号',
-                  prop: 'goodsSpecification',
-                }
-              }, {
-                columnAttributes: {
-                  label: '操作',
-                  prop: '',
-                },
-                render: (h, { row, column, index }) => {
-                  return (
-                    <div style="padding: 0 10px">
-                      <el-button
-                        size="mini"
-                        type="text"
-                        onClick={() => {
-                          this.formData.items.splice(index, 1)
-                        }}
-                      >
-                        删除
-                      </el-button>
-                    </div>
-                  )
-                }
-              }]} table-data={this.formData.items || []} />
-            </div>
-          )
+            )
+          }
         }
-      }]
-    },
+      ]
+    }
   },
   methods: {
     // 列表请求函数
@@ -395,27 +415,29 @@ export default {
       this.formVisible = false
     },
     confirm(data) {
-      data.filter(val => !~this.formData.items.map(item => item.websitGoodsId).indexOf(val.goodsId)).map(item => {
-        this.formData.items.push({
-          "goodsCategoryId": item.goodsCategoryId,
-          "goodsCategoryName": item.categoryName,
-          "goodsCode": item.goodsCode,
-          "goodsSalesUnit": item.goodsStockUnit,
-          "goodsSpecification": item.goodsSpecification,
-          "parentCategoryId": item.parentCategoryId,
-          "parentCategoryName": item.parentCategoryName,
-          "websitGoodsId": item.goodsId,
-          "websitGoodsName": item.goodsName,
-          "workerGoodsId": "",
-          "workerGoodsName": ""
+      data
+        .filter(val => !~this.formData.items.map(item => item.websitGoodsId).indexOf(val.goodsId))
+        .map(item => {
+          this.formData.items.push({
+            goodsCategoryId: item.goodsCategoryId,
+            goodsCategoryName: item.categoryName,
+            goodsCode: item.goodsCode,
+            goodsSalesUnit: item.goodsStockUnit,
+            goodsSpecification: item.goodsSpecification,
+            parentCategoryId: item.parentCategoryId,
+            parentCategoryName: item.parentCategoryName,
+            websitGoodsId: item.goodsId,
+            websitGoodsName: item.goodsName,
+            workerGoodsId: '',
+            workerGoodsName: ''
+          })
         })
-      })
       this.close()
     },
     // 导出
     exportSheet2() {
-      downloadFiles("worker/goods/rela/export", {});
-    },
+      downloadFiles('worker/goods/rela/export', {})
+    }
   }
 }
 </script>

+ 96 - 32
src/views/auxiliaryFittings/auxiliaryDataManagement/masterAuxiliaryMaterials/selectGoods.vue

@@ -1,6 +1,12 @@
 <template>
-  <el-dialog width="980px" title="商品列表" :visible.sync="innerVisible" append-to-body :close-on-click-modal="false"
-    @close="$emit('close')">
+  <el-dialog
+    width="980px"
+    title="商品列表"
+    :visible.sync="innerVisible"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="$emit('close')"
+  >
     <div class="screen-container">
       <el-form ref="tableScreenForm" :model="tableScreenForm" label-width="70px" size="small" label-position="left">
         <el-row :gutter="20">
@@ -16,9 +22,20 @@
           </el-col>
           <el-col :xs="24" :sm="8" :lg="8">
             <el-form-item label="辅材小类" prop="categoryId">
-              <el-cascader v-model="tableScreenForm.categoryId" placeholder="辅材小类" size="small" :show-all-levels="false"
+              <el-cascader
+                v-model="tableScreenForm.categoryId"
+                placeholder="辅材小类"
+                size="small"
+                :show-all-levels="false"
                 clearable
-                :props="{ options: materialCategoryTree, value: 'categoryId', label: 'categoryName', children: 'child', emitPath: false }">
+                :props="{
+                  options: materialCategoryTree,
+                  value: 'categoryId',
+                  label: 'categoryName',
+                  children: 'child',
+                  emitPath: false
+                }"
+              >
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -40,8 +57,17 @@
         </el-row>
       </el-form>
     </div>
-    <el-table ref="goodsTable" :data="goodsList" :row-key="getRowKeys" height="350" size="mini" border
-      header-cell-class-name="headerRowColor" style="width: 100%" @selection-change="handleChooseGoods">
+    <el-table
+      ref="goodsTable"
+      :data="goodsList"
+      :row-key="getRowKeys"
+      height="350"
+      size="mini"
+      border
+      header-cell-class-name="headerRowColor"
+      style="width: 100%"
+      @selection-change="handleChooseGoods"
+    >
       <el-table-column type="selection" width="55" :reserve-selection="true" :selectable="selectable" />
       <el-table-column prop="parentCategoryName" label="大类类名称" />
       <el-table-column prop="categoryName" label="小类名称" />
@@ -52,8 +78,14 @@
     </el-table>
     <div class="pagination clearfix" style="margin-top: 20px">
       <div class="fr">
-        <el-pagination :current-page="table_currentPage" :page-size="table_pageSize" background
-          layout="prev, pager, next" :total="table_listTotal" @current-change="handleTableCurrentChange" />
+        <el-pagination
+          :current-page="table_currentPage"
+          :page-size="table_pageSize"
+          background
+          layout="prev, pager, next"
+          :total="table_listTotal"
+          @current-change="handleTableCurrentChange"
+        />
       </div>
     </div>
     <div slot="footer" class="dialog-footer">
@@ -64,7 +96,7 @@
 
 <script>
 import { materialCategoryTree } from '@/api/auxiliaryMaterialClass'
-import { materialNormList } from "@/api/auxiliaryPriceManagement";
+import { materialNormList } from '@/api/auxiliaryPriceManagement'
 export default {
   props: {
     guolvList: {
@@ -76,11 +108,11 @@ export default {
     return {
       innerVisible: true,
       tableScreenForm: {
-        goodsId: "",
-        goodsName: "",
-        goodsCode: "",
-        categoryId: "",
-        goodsSpecification: ""
+        goodsId: '',
+        goodsName: '',
+        goodsCode: '',
+        categoryId: '',
+        goodsSpecification: ''
       },
       goodsList: [],
       table_currentPage: 1,
@@ -92,11 +124,11 @@ export default {
   },
   created() {
     // 获取小类筛选
-    materialCategoryTree({ state: 'ON' }).then((res2) => {
+    materialCategoryTree({ state: 'ON' }).then(res2 => {
       this.materialCategoryTree = res2.data.filter(item => item.child && item.child.length > 0)
     })
     // 获取列表数据
-    this.getGoodsList();
+    this.getGoodsList()
   },
   methods: {
     selectable(row, index) {
@@ -105,19 +137,51 @@ export default {
     // 获取商品列表
     getGoodsList() {
       materialNormList({
-        "pageNum": this.table_currentPage,
-        "pageSize": this.table_pageSize,
-        "params": [
-          ...(() => { if (this.tableScreenForm.goodsId) { return [{ "param": "a.goods_id", "compare": "like", "value": this.tableScreenForm.goodsId }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.goodsName) { return [{ "param": "a.goods_name", "compare": "like", "value": this.tableScreenForm.goodsName }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.goodsCode) { return [{ "param": "a.goods_code", "compare": "like", "value": this.tableScreenForm.goodsCode }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.goodsSpecification) { return [{ "param": "a.goods_specification", "compare": "like", "value": this.tableScreenForm.goodsSpecification }] } else { return [] } })(),
-          ...(() => { if (this.tableScreenForm.categoryId) { return [{ "param": "b.category_id", "compare": "=", "value": this.tableScreenForm.categoryId }] } else { return [] } })(),
+        pageNum: this.table_currentPage,
+        pageSize: this.table_pageSize,
+        params: [
+          ...(() => {
+            if (this.tableScreenForm.goodsId) {
+              return [{ param: 'a.goods_id', compare: 'like', value: this.tableScreenForm.goodsId }]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.goodsName) {
+              return [{ param: 'a.goods_name', compare: 'like', value: this.tableScreenForm.goodsName }]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.goodsCode) {
+              return [{ param: 'a.goods_code', compare: 'like', value: this.tableScreenForm.goodsCode }]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.goodsSpecification) {
+              return [
+                { param: 'a.goods_specification', compare: 'like', value: this.tableScreenForm.goodsSpecification }
+              ]
+            } else {
+              return []
+            }
+          })(),
+          ...(() => {
+            if (this.tableScreenForm.categoryId) {
+              return [{ param: 'b.category_id', compare: '=', value: this.tableScreenForm.categoryId }]
+            } else {
+              return []
+            }
+          })()
         ]
       }).then(res => {
-        this.goodsList = res.data.records;
-        this.table_listTotal = res.data.total;
-      });
+        this.goodsList = res.data.records
+        this.table_listTotal = res.data.total
+      })
     },
     // 搜索
     getGoodsListByScreen() {
@@ -126,18 +190,18 @@ export default {
     // 更改列表当前页
     handleTableCurrentChange(val) {
       if (this.table_chooseGoods.length > 0) {
-        return this.$errorMsg("当前已选择商品");
+        return this.$errorMsg('当前已选择商品')
       }
-      this.table_currentPage = val;
-      this.getGoodsList();
+      this.table_currentPage = val
+      this.getGoodsList()
     },
     // id
     getRowKeys(row) {
-      return row.goodsId;
+      return row.goodsId
     },
     // table点击选择商品
     handleChooseGoods(val) {
-      this.table_chooseGoods = val;
+      this.table_chooseGoods = val
     },
     selGoods() {
       console.log(this.table_chooseGoods)

+ 18 - 20
src/views/auxiliaryFittings/auxiliaryDataManagement/partsSalesRatio/index.vue

@@ -1,29 +1,29 @@
 <template>
-  <div style="box-sizing: border-box;padding: 20px;">
+  <div style="box-sizing: border-box; padding: 20px">
     <el-card class="box-card">
       <div slot="header" class="clearfix">
         <span>配件配置</span>
       </div>
       <el-form ref="form" :model="form" label-width="80px">
         <el-form-item label="空调">
-          <div style="width: 100%;display: flex;align-items: center;">
-            <div style="width:240px"><el-input v-model="form.priceRate1"></el-input></div>
+          <div style="width: 100%; display: flex; align-items: center">
+            <div style="width: 240px"><el-input v-model="form.priceRate1"></el-input></div>
             <span>倍</span>
-            <div style="margin-left: 10px;color: red;">销售价格倍率设置,需大于等于1</div>
+            <div style="margin-left: 10px; color: red">销售价格倍率设置,需大于等于1</div>
           </div>
         </el-form-item>
         <el-form-item label="生活电器">
-          <div style="width: 100%;display: flex;align-items: center;">
-            <div style="width:240px"><el-input v-model="form.priceRate2"></el-input></div>
+          <div style="width: 100%; display: flex; align-items: center">
+            <div style="width: 240px"><el-input v-model="form.priceRate2"></el-input></div>
             <span>倍</span>
-            <div style="margin-left: 10px;color: red;">销售价格倍率设置,需大于等于1</div>
+            <div style="margin-left: 10px; color: red">销售价格倍率设置,需大于等于1</div>
           </div>
         </el-form-item>
         <el-form-item label="冰箱">
-          <div style="width: 100%;display: flex;align-items: center;">
-            <div style="width:240px"><el-input v-model="form.priceRate3"></el-input></div>
+          <div style="width: 100%; display: flex; align-items: center">
+            <div style="width: 240px"><el-input v-model="form.priceRate3"></el-input></div>
             <span>倍</span>
-            <div style="margin-left: 10px;color: red;">销售价格倍率设置,需大于等于1</div>
+            <div style="margin-left: 10px; color: red">销售价格倍率设置,需大于等于1</div>
           </div>
         </el-form-item>
         <el-form-item>
@@ -35,17 +35,14 @@
 </template>
 
 <script>
-import {
-  partsBaseConfigEdit,
-  partsBaseConfig
-} from "@/api/partsSalesRatio.js"
+import { partsBaseConfigEdit, partsBaseConfig } from '@/api/partsSalesRatio.js'
 export default {
   data() {
     return {
       form: {
-        priceRate1:"",
-        priceRate2:"",
-        priceRate3:"",
+        priceRate1: '',
+        priceRate2: '',
+        priceRate3: ''
       }
     }
   },
@@ -56,9 +53,10 @@ export default {
   },
   methods: {
     onSubmit() {
-      partsBaseConfigEdit(this.form), then(res => {
-        this.$message({ type: 'success', message: `设置成功!` })
-      })
+      partsBaseConfigEdit(this.form),
+        then(res => {
+          this.$message({ type: 'success', message: `设置成功!` })
+        })
     }
   }
 }

+ 19 - 12
src/views/auxiliaryFittings/inventoryManagement/auxiliaryInventory/index.vue

@@ -1,14 +1,21 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { websitStockList, websitStockListExport, websitStockImportM, } from "@/api/inventoryManagement";
+import { websitStockList, websitStockListExport, websitStockImportM } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
@@ -26,7 +33,7 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
@@ -35,7 +42,7 @@ export default {
       return [
         [
           [
-            this.optionsEvensAuth("template", {
+            this.optionsEvensAuth('template', {
               click: () => {
                 commonTemplateDownload({ name: '辅材网点库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -48,25 +55,25 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }),
+            })
           ],
           [
-            this.optionsEvensAuth("imp", ({ moduleName }) => {
+            this.optionsEvensAuth('imp', ({ moduleName }) => {
               return {
                 name: moduleName,
                 render: () => {
                   return this.importButton(websitStockImportM, moduleName)
                 }
               }
-            }),
-          ],
+            })
+          ]
         ]
       ]
     },
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -80,7 +87,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 14 - 7
src/views/auxiliaryFittings/inventoryManagement/auxiliaryInventoryDetails/index.vue

@@ -1,14 +1,21 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { websitStockAccList, websitStockAccListExport, } from "@/api/inventoryManagement";
+import { websitStockAccList, websitStockAccListExport } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 export default {
   components: { TemplatePage },
@@ -27,14 +34,14 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -48,7 +55,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 14 - 7
src/views/auxiliaryFittings/inventoryManagement/masterAuInvenDetails/index.vue

@@ -1,14 +1,21 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { workerStockAccList, workerStockAccListExport, } from "@/api/inventoryManagement";
+import { workerStockAccList, workerStockAccListExport } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 export default {
   components: { TemplatePage },
@@ -27,14 +34,14 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -48,7 +55,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 20 - 13
src/views/auxiliaryFittings/inventoryManagement/masterAuxiliaryInven/index.vue

@@ -1,19 +1,26 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { workerStockList, workerStockListExport, workerStockImportM, } from "@/api/inventoryManagement";
+import { workerStockList, workerStockListExport, workerStockImportM } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage },
-  mixins: [import_mixin,operation_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
       // 表格属性
@@ -26,7 +33,7 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
@@ -35,7 +42,7 @@ export default {
       return [
         [
           [
-            this.optionsEvensAuth("template", {
+            this.optionsEvensAuth('template', {
               click: () => {
                 commonTemplateDownload({ name: '辅材师傅库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -48,25 +55,25 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }),
+            })
           ],
           [
-            this.optionsEvensAuth("imp", ({ moduleName }) => {
+            this.optionsEvensAuth('imp', ({ moduleName }) => {
               return {
                 name: moduleName,
                 render: () => {
                   return this.importButton(workerStockImportM, moduleName)
                 }
               }
-            }),
-          ],
+            })
+          ]
         ]
       ]
     },
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -80,7 +87,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 14 - 7
src/views/auxiliaryFittings/inventoryManagement/masterPaInvenDetails/index.vue

@@ -1,14 +1,21 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { workerStockAccListP, workerStockAccListPExport, } from "@/api/inventoryManagement";
+import { workerStockAccListP, workerStockAccListPExport } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 export default {
   components: { TemplatePage },
@@ -27,14 +34,14 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -48,7 +55,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 19 - 12
src/views/auxiliaryFittings/inventoryManagement/masterPartsInven/index.vue

@@ -1,14 +1,21 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { workerStockListP, workerStockListPExport, workerStockImportP, } from "@/api/inventoryManagement";
+import { workerStockListP, workerStockListPExport, workerStockImportP } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
@@ -26,7 +33,7 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
@@ -35,7 +42,7 @@ export default {
       return [
         [
           [
-            this.optionsEvensAuth("template", {
+            this.optionsEvensAuth('template', {
               click: () => {
                 commonTemplateDownload({ name: '配件师傅库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -48,25 +55,25 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }),
+            })
           ],
           [
-            this.optionsEvensAuth("imp", ({ moduleName }) => {
+            this.optionsEvensAuth('imp', ({ moduleName }) => {
               return {
                 name: moduleName,
                 render: () => {
                   return this.importButton(workerStockImportP, moduleName)
                 }
               }
-            }),
-          ],
+            })
+          ]
         ]
       ]
     },
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -80,7 +87,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 19 - 12
src/views/auxiliaryFittings/inventoryManagement/partsInventory/index.vue

@@ -1,14 +1,21 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { websitStockListP, websitStockListPExport, websitStockImportP, } from "@/api/inventoryManagement";
+import { websitStockListP, websitStockListPExport, websitStockImportP } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
@@ -26,7 +33,7 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
@@ -35,7 +42,7 @@ export default {
       return [
         [
           [
-            this.optionsEvensAuth("template", {
+            this.optionsEvensAuth('template', {
               click: () => {
                 commonTemplateDownload({ name: '配件网点库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -48,25 +55,25 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }),
+            })
           ],
           [
-            this.optionsEvensAuth("imp", ({ moduleName }) => {
+            this.optionsEvensAuth('imp', ({ moduleName }) => {
               return {
                 name: moduleName,
                 render: () => {
                   return this.importButton(websitStockImportP, moduleName)
                 }
               }
-            }),
-          ],
+            })
+          ]
         ]
       ]
     },
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -80,7 +87,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 14 - 7
src/views/auxiliaryFittings/inventoryManagement/partsInventoryDetails/index.vue

@@ -1,14 +1,21 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { websitStockAccListP, websitStockAccListPExport, } from "@/api/inventoryManagement";
+import { websitStockAccListP, websitStockAccListPExport } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 export default {
   components: { TemplatePage },
@@ -27,14 +34,14 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -48,7 +55,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>

+ 157 - 144
src/views/auxiliaryFittings/projectAttachmentManage/index.vue

@@ -1,22 +1,32 @@
 <template>
-	<div class="page">
-		<template-page v-if="isShowTab && !formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
-			:table-events="tableEvents" :operationColumnWidth="170" :options-evens-group="optionsEvensGroup"
-			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
-			<div slot="moreSearch">
-				<el-radio-group v-model="status" size="mini" @change="changeType">
-					<el-radio-button label="">全部</el-radio-button>
-					<el-radio-button label="NO">未付款</el-radio-button>
-					<el-radio-button label="WAIT">部分付款</el-radio-button>
-					<el-radio-button label="OK">已完成</el-radio-button>
-				</el-radio-group>
-				<br><br>
-			</div>
-		</template-page>
-		<div class="detail" v-if="formDialog">
-			<detail :id="id" @back="backList" :formType="formDialogType" title="工程配件收款详情"></detail>
-		</div>
-	</div>
+  <div class="page">
+    <template-page
+      v-if="isShowTab && !formDialog"
+      ref="pageRef"
+      :get-list="getList"
+      :table-attributes="tableAttributes"
+      :table-events="tableEvents"
+      :operationColumnWidth="170"
+      :options-evens-group="optionsEvensGroup"
+      :moreParameters="moreParameters"
+      :column-parsing="columnParsing"
+      :operation="operation()"
+      :exportList="exportList"
+    >
+      <div slot="moreSearch">
+        <el-radio-group v-model="status" size="mini" @change="changeType">
+          <el-radio-button label="">全部</el-radio-button>
+          <el-radio-button label="NO">未付款</el-radio-button>
+          <el-radio-button label="WAIT">部分付款</el-radio-button>
+          <el-radio-button label="OK">已完成</el-radio-button>
+        </el-radio-group>
+        <br /><br />
+      </div>
+    </template-page>
+    <div class="detail" v-if="formDialog">
+      <detail :id="id" @back="backList" :formType="formDialogType" title="工程配件收款详情"></detail>
+    </div>
+  </div>
 </template>
 
 <script>
@@ -26,143 +36,146 @@ import import_mixin from '@/components/template/import_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { listPage, pageExport } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
+import { listPage, pageExport } from '@/api/auxiliaryFittings/projectAuxiliaryManage'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
-	components: { TemplatePage, ImageUpload, detail },
-	mixins: [import_mixin, operation_mixin],
-	data() {
-		return {
-			// 表格属性
-			tableAttributes: {
-				// 启用勾选列
-				selectColumn: true
-			},
-			// 表格事件
-			tableEvents: {
-				'selection-change': this.selectionChange
-			},
-			// 勾选选中行
-			recordSelected: [],
-			/** 表单变量 */
-			formDialogType: 0,
-			formDialogTitles: ["新增", "编辑", "详情"],
-			formDialog: false,
-			id: '',
-			status: this?.$route?.params?.pageCode || '',
-			isShowTab: true
-		}
-	},
-	computed: {
-		// 事件组合
-		optionsEvensGroup() {
-			return [
-				// [
-				// 	[
-				// 		this.optionsEvensAuth("add", {
-				// 			click: this.addData
-				// 		}),
-				// 	]
-				// ]
-			]
-		},
-		// 更多参数
-		moreParameters() {
-			return []
-		},
-		formItems() { }
-	},
-	created(){},
-	watch: {
-		status(){
-			this.isShowTab = false
-			this.$nextTick(()=>{
-				this.isShowTab = true
-			})
-		}
-	},
-	methods: {
-		// 切换状态
-		changeType(val) {
-			this.$refs?.pageRef?.refreshList()
-		},
-		backList() {
-			this.id = ''
-			this.formDialog = false;
-			this.$refs?.pageRef?.refreshList()
-		},
-		// 列表请求函数
-		getList(p, cb) {
-			try {
-				var pam = JSON.parse(JSON.stringify(p))
-				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'P' }, { 'param': 'a.status', "compare": "=", "value": this.status })
-				cb && cb(pam)
-				return listPage(pam)
-			} catch (error) {
-				console.log(error)
-			}
-		},
-		// 列表导出函数
-		exportList: pageExport,
-		// 表格列解析渲染数据更改
-		columnParsing(item, defaultData) {
-			return defaultData
-		},
-		// 监听勾选变化
-		selectionChange(data) {
-			this.recordSelected = data
-		},
+  components: { TemplatePage, ImageUpload, detail },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ['新增', '编辑', '详情'],
+      formDialog: false,
+      id: '',
+      status: this?.$route?.params?.pageCode || '',
+      isShowTab: true
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        // [
+        // 	[
+        // 		this.optionsEvensAuth("add", {
+        // 			click: this.addData
+        // 		}),
+        // 	]
+        // ]
+      ]
+    },
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {}
+  },
+  created() {},
+  watch: {
+    status() {
+      this.isShowTab = false
+      this.$nextTick(() => {
+        this.isShowTab = true
+      })
+    }
+  },
+  methods: {
+    // 切换状态
+    changeType(val) {
+      this.$refs?.pageRef?.refreshList()
+    },
+    backList() {
+      this.id = ''
+      this.formDialog = false
+      this.$refs?.pageRef?.refreshList()
+    },
+    // 列表请求函数
+    getList(p, cb) {
+      try {
+        var pam = JSON.parse(JSON.stringify(p))
+        pam.params.push(
+          { param: 'a.goods_type', compare: '=', value: 'P' },
+          { param: 'a.status', compare: '=', value: this.status }
+        )
+        cb && cb(pam)
+        return listPage(pam)
+      } catch (error) {
+        console.log(error)
+      }
+    },
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
 
-		operation() {
-			return this.operationBtn({
-				detail: {
-					click: ({ row, index, column }) => {
-						this.id = row.websitSalesManagerId
-						this.formDialogType = 2
-						this.openForm()
-					}
-				},
-				sellOrderDetail: {
-					click: ({ row, index, column }) => {
-						this.$router.push({
-							name: 'attachmentSalesOrder',
-							params: {
-								pageName: row.orderEnginBaseId,
-								pageType: '-',
-								pageCode: row.orderEnginBaseId,
-							},
-						})
-					}
-				},
-				returnGoodsDetail: {
-					name:"返还单明细",
-					click: ({ row, index, column }) => {
-						this.$router.push({
-							name: 'attachmentNewReturn',
-							params: {
-								pageName: row.orderEnginBaseId,
-								pageType: '-',
-								pageCode: row.orderEnginBaseId,
-							},
-						})
-					}
-				},
-			})
-		},
+    operation() {
+      return this.operationBtn({
+        detail: {
+          click: ({ row, index, column }) => {
+            this.id = row.websitSalesManagerId
+            this.formDialogType = 2
+            this.openForm()
+          }
+        },
+        sellOrderDetail: {
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: 'attachmentSalesOrder',
+              params: {
+                pageName: row.orderEnginBaseId,
+                pageType: '-',
+                pageCode: row.orderEnginBaseId
+              }
+            })
+          }
+        },
+        returnGoodsDetail: {
+          name: '返还单明细',
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: 'attachmentNewReturn',
+              params: {
+                pageName: row.orderEnginBaseId,
+                pageType: '-',
+                pageCode: row.orderEnginBaseId
+              }
+            })
+          }
+        }
+      })
+    },
 
-		openForm() {
-			this.formDialog = true;
-		}
-	}
+    openForm() {
+      this.formDialog = true
+    }
+  }
 }
 </script>
 
 <style lang="scss" scoped>
 .page {
-	height: 100%;
+  height: 100%;
 }
 
 .tab {
-	padding: 20px 20px 0 20px;
+  padding: 20px 20px 0 20px;
 }
 </style>