aXin-0810 9 ay önce
ebeveyn
işleme
45e2c9c29f

+ 62 - 62
src/views/auxiliaryFittings/attachmentProfile/index.vue

@@ -490,41 +490,41 @@ export default {
             )
           }
         },
-        {
-          md: 6,
-          isShow: this.formData.normType == 'M' ? true : false,
-          name: 'slot-component',
-          attributes: { placeholder: '请输入', type: 'number' },
-          formItemAttributes: {
-            label: '外购配件师傅分账金额',
-            prop: 'outWorkerAmount',
-            rules: [...required]
-          },
-          render: (h, { props, onInput }) => {
-            var { value } = props
-            const that = this
-            return (
-              <div style="position: relative;">
-                <div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
-                  <el-input
-                    v-model={this.formData.outWorkerAmount}
-                    onChange={e => {
-                      this.formData.outWorkerAmount = Number(this.formData.outWorkerAmount).toFixed(2)
-                      if (Number(e) > Number(that.formData.normAmount)) {
-                        this.formData.outWorkerAmount = ''
-                        return this.$message.warning('外购配件师傅分账金额必须小于收费标准!')
-                      }
-                      this.formData.outWebsitAmount = this.Subtr(this.formData.normAmount, e)
-                    }}
-                    type="number"
-                    placeholder="请输入"
-                  ></el-input>
-                  <span style="margin-left: 10px;">元</span>
-                </div>
-              </div>
-            )
-          }
-        },
+        // {
+        //   md: 6,
+        //   isShow: this.formData.normType == 'M' ? true : false,
+        //   name: 'slot-component',
+        //   attributes: { placeholder: '请输入', type: 'number' },
+        //   formItemAttributes: {
+        //     label: '外购配件师傅分账金额',
+        //     prop: 'outWorkerAmount',
+        //     rules: [...required]
+        //   },
+        //   render: (h, { props, onInput }) => {
+        //     var { value } = props
+        //     const that = this
+        //     return (
+        //       <div style="position: relative;">
+        //         <div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+        //           <el-input
+        //             v-model={this.formData.outWorkerAmount}
+        //             onChange={e => {
+        //               this.formData.outWorkerAmount = Number(this.formData.outWorkerAmount).toFixed(2)
+        //               if (Number(e) > Number(that.formData.normAmount)) {
+        //                 this.formData.outWorkerAmount = ''
+        //                 return this.$message.warning('外购配件师傅分账金额必须小于收费标准!')
+        //               }
+        //               this.formData.outWebsitAmount = this.Subtr(this.formData.normAmount, e)
+        //             }}
+        //             type="number"
+        //             placeholder="请输入"
+        //           ></el-input>
+        //           <span style="margin-left: 10px;">元</span>
+        //         </div>
+        //       </div>
+        //     )
+        //   }
+        // },
         {
           md: 6,
           isShow: this.formData.normType == 'M' ? true : false,
@@ -591,33 +591,33 @@ export default {
             )
           }
         },
-        {
-          md: 6,
-          isShow: this.formData.normType == 'M' ? true : false,
-          name: 'slot-component',
-          attributes: { placeholder: '请输入', type: 'number' },
-          formItemAttributes: {
-            label: '外购配件商户分账金额',
-            prop: 'outWebsitAmount',
-            rules: [...required]
-          },
-          render: (h, { props, onInput }) => {
-            var { value } = props
-            return (
-              <div style="position: relative;">
-                <div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
-                  <el-input
-                    v-model={this.formData.outWebsitAmount}
-                    disabled
-                    type="number"
-                    placeholder="请输入"
-                  ></el-input>
-                  <span style="margin-left: 10px;">元</span>
-                </div>
-              </div>
-            )
-          }
-        },
+        // {
+        //   md: 6,
+        //   isShow: this.formData.normType == 'M' ? true : false,
+        //   name: 'slot-component',
+        //   attributes: { placeholder: '请输入', type: 'number' },
+        //   formItemAttributes: {
+        //     label: '外购配件商户分账金额',
+        //     prop: 'outWebsitAmount',
+        //     rules: [...required]
+        //   },
+        //   render: (h, { props, onInput }) => {
+        //     var { value } = props
+        //     return (
+        //       <div style="position: relative;">
+        //         <div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+        //           <el-input
+        //             v-model={this.formData.outWebsitAmount}
+        //             disabled
+        //             type="number"
+        //             placeholder="请输入"
+        //           ></el-input>
+        //           <span style="margin-left: 10px;">元</span>
+        //         </div>
+        //       </div>
+        //     )
+        //   }
+        // },
         {
           md: 24,
           isShow: true,

+ 394 - 345
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryChargeManagement/index.vue

@@ -1,32 +1,56 @@
 <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="180px" :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="180px"
+            :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 { materialNormList, materialNormListExport, materialNormAdd, materialNormEdit, materialNormDetail, materialNormBatchUpdateStatus, materialNormImport2, materialNormImport } from "@/api/auxiliaryChargeManagement";
-import { materialCategoryTree } from "@/api/auxiliaryMaterialClass";
-import { getTypeList } from "@/api/auxiliaryFittings/attachmentProfile";
+import {
+  materialNormList,
+  materialNormListExport,
+  materialNormAdd,
+  materialNormEdit,
+  materialNormDetail,
+  materialNormBatchUpdateStatus,
+  materialNormImport2,
+  materialNormImport
+} from '@/api/auxiliaryChargeManagement'
+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,47 +58,47 @@ 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,
-			"categoryId": "",
-			"companyWechatId": "",
-			"createBy": "",
-			"createTime": "",
-			"normAmount": 0,
-			"normCode": "",
-			"normId": "",
-			"normName": "",
-			"normType": "",
-			"outWebsitAmount": 0,
-			"outWorkerAmount": 0,
-			"parentCategoryId": "",
-			"remark": "",
-			"selfWebsitAmount": 0,
-			"selfWorkerAmount": 0,
-			"specification": "",
-			"status": "ON",
-			"unit": "",
-			manualAmount: 0
-		},
-		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,
+        categoryId: '',
+        companyWechatId: '',
+        createBy: '',
+        createTime: '',
+        normAmount: 0,
+        normCode: '',
+        normId: '',
+        normName: '',
+        normType: '',
+        outWebsitAmount: 0,
+        outWorkerAmount: 0,
+        parentCategoryId: '',
+        remark: '',
+        selfWebsitAmount: 0,
+        selfWorkerAmount: 0,
+        specification: '',
+        status: 'ON',
+        unit: '',
+        manualAmount: 0
+      },
+      partsUnitList: [],
+      materialCategoryTree: [],
+      formType: 'add',
+      formVisible: false
     }
   },
   computed: {
@@ -83,18 +107,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: () => {
@@ -102,7 +126,7 @@ export default {
                 }
               }
             }),
-            this.optionsEvensAuth("template", {
+            this.optionsEvensAuth('template', {
               click: () => {
                 commonTemplateDownload({ name: '辅材收费标准模板(物料收费).xlsx' }, `辅材收费标准模板(物料收费)`)
                   .then(res => {
@@ -115,14 +139,14 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }),
+            })
           ],
           [
-            this.optionsEvensAuth(["Import", "downloadTemplate"], {
+            this.optionsEvensAuth(['Import', 'downloadTemplate'], {
               name: '导入服务',
-              click: () => { }
+              click: () => {}
             }),
-            this.optionsEvensAuth("Import", ({ moduleName }) => {
+            this.optionsEvensAuth('Import', ({ moduleName }) => {
               return {
                 name: moduleName,
                 render: () => {
@@ -130,7 +154,7 @@ export default {
                 }
               }
             }),
-            this.optionsEvensAuth("downloadTemplate", {
+            this.optionsEvensAuth('downloadTemplate', {
               click: () => {
                 commonTemplateDownload({ name: '辅材收费标准模板(服务收费).xlsx' }, `辅材收费标准模板(服务收费)`)
                   .then(res => {
@@ -143,37 +167,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: `请先勾选需要设置的数据!`
+                  })
                 }
               }
-            }),
+            })
           ]
         ]
       ]
@@ -183,236 +207,256 @@ 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: 'categoryId',
-          rules: [...required]
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '辅材名称',
-          prop: 'normName',
-          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: 'unit',
-          rules: [...required]
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '商品代码',
-          prop: 'normCode',
-          rules: []
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '规格型号',
-          prop: 'specification',
-          rules: []
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-radio',
-        options: [{ label: "物料收费", value: "M" }, { label: "服务收费", value: "S" }],
-        attributes: {},
-        formItemAttributes: {
-          label: '收费类型',
-          prop: 'normType',
-          rules: [...required]
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-radio',
+          options: [
+            { label: '上架', value: 'ON' },
+            { label: '下架', value: 'OFF' }
+          ],
+          attributes: {},
+          formItemAttributes: {
+            label: '状态',
+            prop: 'status',
+            rules: [...required]
+          }
         },
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "number" },
-        formItemAttributes: {
-          label: '收费标准',
-          prop: 'normAmount',
-          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: 'categoryId',
+            rules: [...required]
+          }
         },
-        events: {
-          input: (val) => {
-            this.formData.selfWorkerAmount = ""
-            this.formData.outWorkerAmount = ""
-            this.$nextTick(() => {
-              this.formData.selfWebsitAmount = this.setNumber(
-                this.formData.normAmount - (this.formData.selfWorkerAmount || 0)
-              )
-              this.formData.outWebsitAmount = this.setNumber(
-                this.formData.normAmount - (this.formData.outWorkerAmount || 0)
-              )
-            })
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '辅材名称',
+            prop: 'normName',
+            rules: [...required]
           }
         },
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'slot-component',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '',
-          prop: '',
-          'label-width': "0px"
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-select-add',
+          labelKey: 'dictValue',
+          valueKey: 'dictValue',
+          options: this.partsUnitList,
+          attributes: { placeholder: '请选择单位', filterable: true, clearable: true },
+          formItemAttributes: {
+            label: '单位',
+            prop: 'unit',
+            rules: [...required]
+          }
         },
-        render: (h, { props, onInput }) => {
-          var { value } = props
-          return (
-            <div style="color:red">注:分账金额需扣除手续费0.6%</div>
-          )
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "number", disabled: !this.formData.normAmount, },
-        formItemAttributes: {
-          label: '自有库存师傅(分账金额)',
-          prop: 'selfWorkerAmount',
-          rules: [...required]
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '商品代码',
+            prop: 'normCode',
+            rules: []
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '规格型号',
+            prop: 'specification',
+            rules: []
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-radio',
+          options: [
+            { label: '物料收费', value: 'M' },
+            { label: '服务收费', value: 'S' }
+          ],
+          attributes: {},
+          formItemAttributes: {
+            label: '收费类型',
+            prop: 'normType',
+            rules: [...required]
+          }
         },
-        events: {
-          input: (val) => {
-            if (Number(val) > this.formData.normAmount) {
-              this.formData.selfWorkerAmount = this.setNumber(
-                this.formData.normAmount
-              )
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'number' },
+          formItemAttributes: {
+            label: '收费标准',
+            prop: 'normAmount',
+            rules: [...required]
+          },
+          events: {
+            input: val => {
+              this.formData.selfWorkerAmount = ''
+              this.formData.outWorkerAmount = ''
+              this.$nextTick(() => {
+                this.formData.selfWebsitAmount = this.setNumber(
+                  this.formData.normAmount - (this.formData.selfWorkerAmount || 0)
+                )
+                this.formData.outWebsitAmount = this.setNumber(
+                  this.formData.normAmount - (this.formData.outWorkerAmount || 0)
+                )
+              })
             }
-            this.formData.selfWebsitAmount = this.setNumber(
-              this.formData.normAmount - this.formData.selfWorkerAmount
-            )
           }
         },
-        slots: {
-          append: (h, { props, onInput }) => {
-            return <div>元</div>
+        {
+          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">注:分账金额需扣除手续费0.6%</div>
           }
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "number", disabled: !this.formData.normAmount, },
-        formItemAttributes: {
-          label: '外购辅材师傅(分账金额)',
-          prop: 'outWorkerAmount',
-          rules: [...required]
         },
-        events: {
-          input: (val) => {
-            if (Number(val) > this.formData.normAmount) {
-              this.formData.outWorkerAmount = this.setNumber(
-                this.formData.normAmount
-              )
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'number', disabled: !this.formData.normAmount },
+          formItemAttributes: {
+            label: '自有库存师傅(分账金额)',
+            prop: 'selfWorkerAmount',
+            rules: [...required]
+          },
+          events: {
+            input: val => {
+              if (Number(val) > this.formData.normAmount) {
+                this.formData.selfWorkerAmount = this.setNumber(this.formData.normAmount)
+              }
+              this.formData.selfWebsitAmount = this.setNumber(this.formData.normAmount - this.formData.selfWorkerAmount)
+            }
+          },
+          slots: {
+            append: (h, { props, onInput }) => {
+              return <div>元</div>
             }
-            this.formData.outWebsitAmount = this.setNumber(
-              this.formData.normAmount - this.formData.outWorkerAmount
-            )
           }
         },
-        slots: {
-          append: (h, { props, onInput }) => {
-            return <div>元</div>
+        // {
+        //   md: 6,
+        //   isShow: true,
+        //   name: 'el-input',
+        //   attributes: { placeholder: '请输入', type: 'number', disabled: !this.formData.normAmount },
+        //   formItemAttributes: {
+        //     label: '外购辅材师傅(分账金额)',
+        //     prop: 'outWorkerAmount',
+        //     rules: [...required]
+        //   },
+        //   events: {
+        //     input: val => {
+        //       if (Number(val) > this.formData.normAmount) {
+        //         this.formData.outWorkerAmount = this.setNumber(this.formData.normAmount)
+        //       }
+        //       this.formData.outWebsitAmount = this.setNumber(this.formData.normAmount - this.formData.outWorkerAmount)
+        //     }
+        //   },
+        //   slots: {
+        //     append: (h, { props, onInput }) => {
+        //       return <div>元</div>
+        //     }
+        //   }
+        // },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', disabled: true, type: 'number' },
+          formItemAttributes: {
+            label: '自有库存商户(分账金额)',
+            prop: 'selfWebsitAmount',
+            rules: [...required]
+          },
+          slots: {
+            append: (h, { props, onInput }) => {
+              return <div>元</div>
+            }
           }
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', disabled: true, type: "number", },
-        formItemAttributes: {
-          label: '自有库存商户(分账金额)',
-          prop: 'selfWebsitAmount',
-          rules: [...required]
         },
-        slots: {
-          append: (h, { props, onInput }) => {
-            return <div>元</div>
+        // {
+        // md: 6,
+        // isShow: true,
+        // name: 'el-input',
+        // attributes: { placeholder: '请输入', disabled: true, type: "number", },
+        // formItemAttributes: {
+        //   label: '外购辅材商户(分账金额)',
+        //   prop: 'outWebsitAmount',
+        //   rules: [...required]
+        // },
+        // slots: {
+        //   append: (h, { props, onInput }) => {
+        //     return <div>元</div>
+        //   }
+        // }
+        // },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'number' },
+          formItemAttributes: {
+            label: '师傅手工费用',
+            prop: 'manualAmount',
+            rules: [...required]
           }
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', disabled: true, type: "number", },
-        formItemAttributes: {
-          label: '外购辅材商户(分账金额)',
-          prop: 'outWebsitAmount',
-          rules: [...required]
         },
-        slots: {
-          append: (h, { props, onInput }) => {
-            return <div>元</div>
+        {
+          md: 24,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入', type: 'textarea', rows: 5 },
+          formItemAttributes: {
+            label: '备注',
+            prop: 'remark',
+            rules: []
           }
         }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: 'number' },
-        formItemAttributes: {
-          label: '师傅手工费用',
-          prop: 'manualAmount',
-          rules: [...required]
-        }
-      }, {
-        md: 24,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: "textarea", rows: 5 },
-        formItemAttributes: {
-          label: '备注',
-          prop: 'remark',
-          rules: []
-        }
-      }]
+      ]
     }
   },
   methods: {
@@ -430,54 +474,59 @@ export default {
     },
 
     operation() {
-		return this.operationBtn({
-			edit: {
-				click: ({ row, index, column }) => {
-					this.openForm('edit',row.normId)
-				}
-			},
-		})
-    },
-    openForm() {
-      
+      return this.operationBtn({
+        edit: {
+          click: ({ row, index, column }) => {
+            this.openForm('edit', row.normId)
+          }
+        }
+      })
     },
+    openForm() {},
     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()
-    		}
-    	})
+      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
@@ -487,7 +536,7 @@ export default {
     formConfirm(cancel) {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([materialNormAdd, materialNormEdit][this.formDialogType])(this.formData).then(res => {
+          ;[materialNormAdd, materialNormEdit][this.formDialogType](this.formData).then(res => {
             this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
             cancel('list')
             this.$refs.pageRef.refreshList()