|  | @@ -23,7 +23,7 @@
 | 
	
		
			
				|  |  |              <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:6">
 | 
	
		
			
				|  |  |                <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
 | 
	
		
			
				|  |  |                  <avue-input-tree
 | 
	
		
			
				|  |  | -                  v-if="item.prop === 'corpsTypeId'"
 | 
	
		
			
				|  |  | +                  v-if="item.prop === 'goodsTypeId'"
 | 
	
		
			
				|  |  |                    leaf-only
 | 
	
		
			
				|  |  |                    multiple
 | 
	
		
			
				|  |  |                    style="width: 100%;"
 | 
	
	
		
			
				|  | @@ -44,7 +44,7 @@
 | 
	
		
			
				|  |  |          <containerTitle title="包装资料"></containerTitle>
 | 
	
		
			
				|  |  |          <basic-container style="margin-bottom: 10px">
 | 
	
		
			
				|  |  |            <el-row>
 | 
	
		
			
				|  |  | -            <el-col v-for="(item,index) in packingData.column" :key="index" :span="item.span?item.span:8">
 | 
	
		
			
				|  |  | +            <el-col v-for="(item,index) in packingData.column" :key="index" :span="item.span?item.span:6">
 | 
	
		
			
				|  |  |                <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
 | 
	
		
			
				|  |  |                  <el-input type="textarea" v-if="(item.type === 'textarea')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder=" "></el-input>
 | 
	
		
			
				|  |  |                  <el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
 | 
	
	
		
			
				|  | @@ -117,6 +117,7 @@ import customerContact from "./configuration/customerContact.json"
 | 
	
		
			
				|  |  |  import customerPurchase from "./configuration/customerPurchase.json"
 | 
	
		
			
				|  |  |  import {detail, corpsattn, typeSave} from "@/api/maintenance/priceManagement"
 | 
	
		
			
				|  |  |  import imgUploadList from "./configuration/imgUploadList.json"
 | 
	
		
			
				|  |  | +import { getDetail, updateDetail } from "@/api/basicData/commodityType";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "detailsPage",
 | 
	
	
		
			
				|  | @@ -145,8 +146,8 @@ export default {
 | 
	
		
			
				|  |  |        basicData: {
 | 
	
		
			
				|  |  |          column: [
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | -            label: '产品编码',
 | 
	
		
			
				|  |  | -            prop: 'bigCharacter',
 | 
	
		
			
				|  |  | +            label: '商品编码',
 | 
	
		
			
				|  |  | +            prop: 'code',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: true,
 | 
	
	
		
			
				|  | @@ -155,8 +156,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '中文名称',
 | 
	
		
			
				|  |  | -            prop: 'brand',
 | 
	
		
			
				|  |  | +            label: '商品名称',
 | 
	
		
			
				|  |  | +            prop: 'cname',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: true,
 | 
	
	
		
			
				|  | @@ -166,7 +167,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '英文名称',
 | 
	
		
			
				|  |  | -            prop: 'status',
 | 
	
		
			
				|  |  | +            prop: 'ename',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: true,
 | 
	
	
		
			
				|  | @@ -177,7 +178,7 @@ export default {
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: '商品类别',
 | 
	
		
			
				|  |  | -            prop: 'corpsTypeId',
 | 
	
		
			
				|  |  | +            prop: 'goodsTypeId',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -187,7 +188,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '中文规格',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'Typeno',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -198,17 +199,7 @@ export default {
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: '英文规格',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | -            rules: [
 | 
	
		
			
				|  |  | -              {
 | 
	
		
			
				|  |  | -                required: false,
 | 
	
		
			
				|  |  | -                message: ' ',
 | 
	
		
			
				|  |  | -                trigger: 'blur'
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -            ]
 | 
	
		
			
				|  |  | -          }, {
 | 
	
		
			
				|  |  | -            label: '中文型号',
 | 
	
		
			
				|  |  | -            prop: 'category',
 | 
	
		
			
				|  |  | +            prop: 'etypeno',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -217,18 +208,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '英文型号',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | -            rules: [
 | 
	
		
			
				|  |  | -              {
 | 
	
		
			
				|  |  | -                required: false,
 | 
	
		
			
				|  |  | -                message: ' ',
 | 
	
		
			
				|  |  | -                trigger: 'blur'
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -            ]
 | 
	
		
			
				|  |  | -          },  {
 | 
	
		
			
				|  |  |              label: '海关中文',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'customName',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -238,7 +219,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '海关英文',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'customEname',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -248,7 +229,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '海关编码',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'customCode',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -258,7 +239,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            },{
 | 
	
		
			
				|  |  |              label: '退税率',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'customRate',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -280,8 +261,8 @@ export default {
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: '中文描述',
 | 
	
		
			
				|  |  | -            prop: 'typeno',
 | 
	
		
			
				|  |  | -            span: 6,
 | 
	
		
			
				|  |  | +            prop: 'nameDescription',
 | 
	
		
			
				|  |  | +            span: 24,
 | 
	
		
			
				|  |  |              type:'textarea',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
	
		
			
				|  | @@ -292,8 +273,8 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '英文描述',
 | 
	
		
			
				|  |  | -            prop: 'brandItem',
 | 
	
		
			
				|  |  | -            span: 6,
 | 
	
		
			
				|  |  | +            prop: 'cnameDescription',
 | 
	
		
			
				|  |  | +            span: 24,
 | 
	
		
			
				|  |  |              type:'textarea',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
	
		
			
				|  | @@ -309,7 +290,7 @@ export default {
 | 
	
		
			
				|  |  |          column: [
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: '长度单位',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'lengthUnit',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -319,7 +300,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '重量单位',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'weightUnit',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -329,7 +310,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '包装单位',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'packgeunit',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -339,7 +320,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '每个体积',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'singleVolumn',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -349,7 +330,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '每个毛重',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'singleGrossWeight',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -359,7 +340,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '每个净重',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'singleWeight',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -369,7 +350,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '每箱体积',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'cntrVolumn',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -379,7 +360,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '每箱毛重',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'cntrGrossWeight',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -389,7 +370,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '每箱净重',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'cntrWeight',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -399,7 +380,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '包装描述',
 | 
	
		
			
				|  |  | -            prop: 'productCategory',
 | 
	
		
			
				|  |  | +            prop: 'packageDescription',
 | 
	
		
			
				|  |  |              type:'textarea',
 | 
	
		
			
				|  |  |              span:24,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
	
		
			
				|  | @@ -417,10 +398,10 @@ export default {
 | 
	
		
			
				|  |  |    //初始化查询
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  |      if (this.$route.query.id) {
 | 
	
		
			
				|  |  | -      detail(JSON.parse(this.$route.query.id)).then(res => {
 | 
	
		
			
				|  |  | +      getDetail(JSON.parse(this.$route.query.id)).then(res => {
 | 
	
		
			
				|  |  |          this.form = res.data.data
 | 
	
		
			
				|  |  | -        this.contactsData = res.data.data.priceItemList
 | 
	
		
			
				|  |  | -        delete this.form.priceItemList
 | 
	
		
			
				|  |  | +        // this.contactsData = res.data.data.saleGoodsPrice
 | 
	
		
			
				|  |  | +        // this.purchaseData = res.data.data.bugGoodsPrice
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  |        this.form = {}
 | 
	
	
		
			
				|  | @@ -428,14 +409,14 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    watch: {
 | 
	
		
			
				|  |  | -    '$route'(to, from) {
 | 
	
		
			
				|  |  | -      console.log(to, from);
 | 
	
		
			
				|  |  | -      if (this.$route.query.id) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        this.form = {}
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    // '$route'(to, from) {
 | 
	
		
			
				|  |  | +    //   console.log(to, from);
 | 
	
		
			
				|  |  | +    //   if (this.$route.query.id) {
 | 
	
		
			
				|  |  | +    //
 | 
	
		
			
				|  |  | +    //   } else {
 | 
	
		
			
				|  |  | +    //     this.form = {}
 | 
	
		
			
				|  |  | +    //   }
 | 
	
		
			
				|  |  | +    // }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      rowContactSave(row, done, loading) {
 | 
	
	
		
			
				|  | @@ -477,16 +458,20 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //修改提交触发
 | 
	
		
			
				|  |  |      editCustomer() {
 | 
	
		
			
				|  |  | -      console.log(this.form)
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid) => {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  | -          this.form.priceItemList = this.contactsData
 | 
	
		
			
				|  |  | -          typeSave(this.form).then(res => {
 | 
	
		
			
				|  |  | +          const params = {
 | 
	
		
			
				|  |  | +            ...this.form,
 | 
	
		
			
				|  |  | +            type:0,
 | 
	
		
			
				|  |  | +            goodsTypeId:"0",
 | 
	
		
			
				|  |  | +            saleGoodsPrice : this.contactsData,
 | 
	
		
			
				|  |  | +            bugGoodsPrice : this.purchaseData
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          updateDetail(params).then(res => {
 | 
	
		
			
				|  |  |              this.$message({
 | 
	
		
			
				|  |  |                type: "success",
 | 
	
		
			
				|  |  |                message: this.form.id ? "修改成功!" : "新增成功!"
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  | -            this.backToList()
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |            return false;
 |