|  | @@ -46,7 +46,14 @@
 | 
	
		
			
				|  |  |                v-model="form.corpId"
 | 
	
		
			
				|  |  |                @getCorpData="getCorpData"
 | 
	
		
			
				|  |  |                corpType="KH"
 | 
	
		
			
				|  |  | -            ></crop-select>
 | 
	
		
			
				|  |  | +            />
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +          <template slot="belongToCorpId">
 | 
	
		
			
				|  |  | +            <crop-select
 | 
	
		
			
				|  |  | +              v-model="form.belongToCorpId"
 | 
	
		
			
				|  |  | +              @getCorpData="getGSData"
 | 
	
		
			
				|  |  | +              corpType="GS"
 | 
	
		
			
				|  |  | +            />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="storageId">
 | 
	
		
			
				|  |  |              <warehouse-select
 | 
	
	
		
			
				|  | @@ -123,19 +130,27 @@
 | 
	
		
			
				|  |  |              <span v-else> {{ row.cname }}</span>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="actualQuantity" slot-scope="{ row, index }">
 | 
	
		
			
				|  |  | -            <el-input
 | 
	
		
			
				|  |  | +            <el-input-number
 | 
	
		
			
				|  |  |                v-if="row.$cellEdit"
 | 
	
		
			
				|  |  |                v-model="row.actualQuantity"
 | 
	
		
			
				|  |  |                size="small"
 | 
	
		
			
				|  |  | -            ></el-input>
 | 
	
		
			
				|  |  | +              :controls="false"
 | 
	
		
			
				|  |  | +              :precision="0"
 | 
	
		
			
				|  |  | +              @input="amountChange(row)"
 | 
	
		
			
				|  |  | +              style="width: 100%"
 | 
	
		
			
				|  |  | +            />
 | 
	
		
			
				|  |  |              <span v-else>{{ row.actualQuantity }}</span>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="price" slot-scope="{ row, index }">
 | 
	
		
			
				|  |  | -            <el-input
 | 
	
		
			
				|  |  | +            <el-input-number
 | 
	
		
			
				|  |  |                v-if="row.$cellEdit"
 | 
	
		
			
				|  |  |                v-model="row.price"
 | 
	
		
			
				|  |  |                size="small"
 | 
	
		
			
				|  |  | -            ></el-input>
 | 
	
		
			
				|  |  | +              :controls="false"
 | 
	
		
			
				|  |  | +              :precision="2"
 | 
	
		
			
				|  |  | +              @input="amountChange(row)"
 | 
	
		
			
				|  |  | +              style="width: 100%"
 | 
	
		
			
				|  |  | +            ></el-input-number>
 | 
	
		
			
				|  |  |              <span v-else>{{ row.price }}</span>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |  <!--          单位-->
 | 
	
	
		
			
				|  | @@ -158,6 +173,21 @@
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </avue-crud>
 | 
	
		
			
				|  |  |        </basic-container>
 | 
	
		
			
				|  |  | +      <containerTitle title="详细信息"/>
 | 
	
		
			
				|  |  | +      <basic-container :showBtn="true">
 | 
	
		
			
				|  |  | +        <avue-form
 | 
	
		
			
				|  |  | +          ref="form"
 | 
	
		
			
				|  |  | +          class="trading-form"
 | 
	
		
			
				|  |  | +          v-model="form"
 | 
	
		
			
				|  |  | +          :option="detailOption"
 | 
	
		
			
				|  |  | +        ></avue-form>
 | 
	
		
			
				|  |  | +      </basic-container>
 | 
	
		
			
				|  |  | +      <containerTitle title="附件管理"></containerTitle>
 | 
	
		
			
				|  |  | +      <c-upload
 | 
	
		
			
				|  |  | +        :data="uploadData"
 | 
	
		
			
				|  |  | +        deleteUrl="/api/blade-client/corpsbank/update"
 | 
	
		
			
				|  |  | +        :enumerationValue="84"
 | 
	
		
			
				|  |  | +      />
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <el-dialog
 | 
	
		
			
				|  |  |        title="导入商品"
 | 
	
	
		
			
				|  | @@ -227,6 +257,7 @@ import {getDeptLazyTree,
 | 
	
		
			
				|  |  |    getGoods,} from "@/api/basicData/customerInquiry";
 | 
	
		
			
				|  |  |  import {getUserInfo} from "@/api/system/user";
 | 
	
		
			
				|  |  |  import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
 | 
	
		
			
				|  |  | +import {detail as KHDetail} from "@/api/basicData/customerInformation";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "detail",
 | 
	
	
		
			
				|  | @@ -257,12 +288,6 @@ export default {
 | 
	
		
			
				|  |  |              slot: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | -            label: "系统号",
 | 
	
		
			
				|  |  | -            prop: "sysNo",
 | 
	
		
			
				|  |  | -            span: 8,
 | 
	
		
			
				|  |  | -            disabled: true
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  |              label: "业务时间",
 | 
	
		
			
				|  |  |              prop: "businesDate",
 | 
	
		
			
				|  |  |              span: 8,
 | 
	
	
		
			
				|  | @@ -278,6 +303,19 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | +            label: "所属公司",
 | 
	
		
			
				|  |  | +            prop: "belongToCorpId",
 | 
	
		
			
				|  |  | +            rules: [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: " ",
 | 
	
		
			
				|  |  | +                trigger: "change"
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            ],
 | 
	
		
			
				|  |  | +            span: 16,
 | 
	
		
			
				|  |  | +            slot: true
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  |              label: "电话",
 | 
	
		
			
				|  |  |              prop: "corpTel",
 | 
	
		
			
				|  |  |              span: 8
 | 
	
	
		
			
				|  | @@ -288,35 +326,85 @@ export default {
 | 
	
		
			
				|  |  |              span: 8
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | +            label: "经办人",
 | 
	
		
			
				|  |  | +            prop: "e",
 | 
	
		
			
				|  |  | +            span: 8,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "结算方式",
 | 
	
		
			
				|  |  | +            prop: "paymentType",
 | 
	
		
			
				|  |  | +            span: 8,
 | 
	
		
			
				|  |  | +            type: "select",
 | 
	
		
			
				|  |  | +            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
 | 
	
		
			
				|  |  | +            props: {
 | 
	
		
			
				|  |  | +              label: "dictValue",
 | 
	
		
			
				|  |  | +              value: "dictValue"
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "配送方式",
 | 
	
		
			
				|  |  | +            prop: "f",
 | 
	
		
			
				|  |  | +            span: 8,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "发货仓库",
 | 
	
		
			
				|  |  | +            prop: "storageId",
 | 
	
		
			
				|  |  | +            span: 8,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "备注",
 | 
	
		
			
				|  |  | +            prop: "orderRemark",
 | 
	
		
			
				|  |  | +            type: "textarea",
 | 
	
		
			
				|  |  | +            minRows: 2,
 | 
	
		
			
				|  |  | +            span: 24
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +        ],
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      detailOption: {
 | 
	
		
			
				|  |  | +        menuBtn: false,
 | 
	
		
			
				|  |  | +        labelWidth: 100,
 | 
	
		
			
				|  |  | +        column: [
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "系统号",
 | 
	
		
			
				|  |  | +            prop: "sysNo",
 | 
	
		
			
				|  |  | +            span: 8,
 | 
	
		
			
				|  |  | +            disabled: true
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  |              label: "打印时间",
 | 
	
		
			
				|  |  |              prop: "a",
 | 
	
		
			
				|  |  |              span: 8,
 | 
	
		
			
				|  |  |              disabled: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | +            label: "打印次数",
 | 
	
		
			
				|  |  | +            prop: "a",
 | 
	
		
			
				|  |  | +            span: 8,
 | 
	
		
			
				|  |  | +            disabled: true
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  |              label: "客户欠款",
 | 
	
		
			
				|  |  |              prop: "a",
 | 
	
		
			
				|  |  |              span: 8,
 | 
	
		
			
				|  |  | +            disabled: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "总数量",
 | 
	
		
			
				|  |  |              prop: "b",
 | 
	
		
			
				|  |  |              span: 8,
 | 
	
		
			
				|  |  | +            disabled: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "应收金额",
 | 
	
		
			
				|  |  |              prop: "c",
 | 
	
		
			
				|  |  |              span: 8,
 | 
	
		
			
				|  |  | +            disabled: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "总金额",
 | 
	
		
			
				|  |  |              prop: "d",
 | 
	
		
			
				|  |  |              span: 8,
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  | -            label: "经办人",
 | 
	
		
			
				|  |  | -            prop: "e",
 | 
	
		
			
				|  |  | -            span: 8,
 | 
	
		
			
				|  |  | +            disabled: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "制单人",
 | 
	
	
		
			
				|  | @@ -324,28 +412,7 @@ export default {
 | 
	
		
			
				|  |  |              span: 8,
 | 
	
		
			
				|  |  |              disabled: true,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  | -            label: "结算方式",
 | 
	
		
			
				|  |  | -            prop: "paymentType",
 | 
	
		
			
				|  |  | -            span: 8,
 | 
	
		
			
				|  |  | -            type: "select",
 | 
	
		
			
				|  |  | -            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
 | 
	
		
			
				|  |  | -            props: {
 | 
	
		
			
				|  |  | -              label: "dictValue",
 | 
	
		
			
				|  |  | -              value: "dictValue"
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  | -            label: "配送方式",
 | 
	
		
			
				|  |  | -            prop: "f",
 | 
	
		
			
				|  |  | -            span: 8,
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  | -            label: "发货仓库",
 | 
	
		
			
				|  |  | -            prop: "storageId",
 | 
	
		
			
				|  |  | -            span: 8,
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | +        ]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        dataList: [],
 | 
	
		
			
				|  |  |        tableOption: {},
 | 
	
	
		
			
				|  | @@ -397,6 +464,7 @@ export default {
 | 
	
		
			
				|  |  |          placeholder: "请点击右边按钮选择",
 | 
	
		
			
				|  |  |          dicData: [],
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      uploadData: [],
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    async created() {
 | 
	
	
		
			
				|  | @@ -415,12 +483,36 @@ export default {
 | 
	
		
			
				|  |  |        this.$set(this.form, 'createUser', res.data.data.realName)
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  |      if (this.detailData.id) {
 | 
	
		
			
				|  |  | -      this.$set(this.form, 'paymentType', '到付')
 | 
	
		
			
				|  |  |        this.$set(this.form, 'id', this.detailData.id)
 | 
	
		
			
				|  |  |        this.$set(this.form, 'businesDate', this.detailData.row.businesDate)
 | 
	
		
			
				|  |  |        this.$set(this.form, 'corpId', this.detailData.row.corpsName)
 | 
	
		
			
				|  |  | -      this.$set(this.form, 'corpTel', '1918766221')
 | 
	
		
			
				|  |  | -      this.$set(this.form, 'arrivalAddress', '山东省青岛市')
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'corpTel', this.detailData.row.tel)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'arrivalAddress', this.detailData.row.attn)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'createUser', this.detailData.row.createUser)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'storageId', this.detailData.row.storageId)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'paymentType', this.detailData.row.paymentType)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'belongToCorpId', this.detailData.row.belongToCorpId)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'e', this.detailData.row.e)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'f', this.detailData.row.f)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +      this.dataList = [
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          code: null,
 | 
	
		
			
				|  |  | +          cname: null,
 | 
	
		
			
				|  |  | +          typeno: null,
 | 
	
		
			
				|  |  | +          brandItem: null,
 | 
	
		
			
				|  |  | +          specsOne: null,
 | 
	
		
			
				|  |  | +          specsTwo: null,
 | 
	
		
			
				|  |  | +          a: null,
 | 
	
		
			
				|  |  | +          storageQuantity: 0,
 | 
	
		
			
				|  |  | +          actualQuantity: 0,
 | 
	
		
			
				|  |  | +          size: null,
 | 
	
		
			
				|  |  | +          price: 0,
 | 
	
		
			
				|  |  | +          amount: 0,
 | 
	
		
			
				|  |  | +          $cellEdit: true
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      ]
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
	
		
			
				|  | @@ -431,7 +523,16 @@ export default {
 | 
	
		
			
				|  |  |      copyDoc() {
 | 
	
		
			
				|  |  |        this.$emit("copyOrder", this.form.id);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getCorpData(row) {},
 | 
	
		
			
				|  |  | +    getCorpData(row) {
 | 
	
		
			
				|  |  | +      KHDetail(row.id).then(res => {
 | 
	
		
			
				|  |  | +        if (res.data.data.belongtocompany) {
 | 
	
		
			
				|  |  | +          this.$set(this.form, 'belongToCorpId', res.data.data.belongtocompany)
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          this.$set(this.form, 'belongToCorpId', null)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getGSData(row) {},
 | 
	
		
			
				|  |  |      //修改提交触发
 | 
	
		
			
				|  |  |      editCustomer(status) {
 | 
	
		
			
				|  |  |        this.$message.success('保存成功')
 | 
	
	
		
			
				|  | @@ -449,6 +550,9 @@ export default {
 | 
	
		
			
				|  |  |          this.$message.success("保存成功");
 | 
	
		
			
				|  |  |          //关闭窗口
 | 
	
		
			
				|  |  |          this.$refs.crud.$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +        this.$nextTick(() => {
 | 
	
		
			
				|  |  | +          this.$refs.crud.doLayout()
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      async resetColumn() {
 | 
	
	
		
			
				|  | @@ -458,6 +562,9 @@ export default {
 | 
	
		
			
				|  |  |          tableOption
 | 
	
		
			
				|  |  |        );
 | 
	
		
			
				|  |  |        if (inSave) {
 | 
	
		
			
				|  |  | +        this.$nextTick(() => {
 | 
	
		
			
				|  |  | +          this.$refs.crud.doLayout()
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |          this.$message.success("重置成功");
 | 
	
		
			
				|  |  |          //关闭窗口
 | 
	
		
			
				|  |  |          setTimeout(() => {
 | 
	
	
		
			
				|  | @@ -578,6 +685,9 @@ export default {
 | 
	
		
			
				|  |  |          this.$message.success("保存成功");
 | 
	
		
			
				|  |  |          //关闭窗口
 | 
	
		
			
				|  |  |          this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +        this.$nextTick(() => {
 | 
	
		
			
				|  |  | +          this.$refs.goodsCrud.doLayout()
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      async resetGoodsColumn() {
 | 
	
	
		
			
				|  | @@ -587,6 +697,9 @@ export default {
 | 
	
		
			
				|  |  |          goodsOption
 | 
	
		
			
				|  |  |        );
 | 
	
		
			
				|  |  |        if (inSave) {
 | 
	
		
			
				|  |  | +        this.$nextTick(() => {
 | 
	
		
			
				|  |  | +          this.$refs.goodsCrud.doLayout()
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |          this.$message.success("重置成功");
 | 
	
		
			
				|  |  |          //关闭窗口
 | 
	
		
			
				|  |  |          setTimeout(() => {
 | 
	
	
		
			
				|  | @@ -649,6 +762,16 @@ export default {
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |        this.newDetails();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 商品信息价格计算
 | 
	
		
			
				|  |  | +    amountChange(row) {
 | 
	
		
			
				|  |  | +      if (!row.actualQuantity) {
 | 
	
		
			
				|  |  | +        row.actualQuantity = 0;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (!row.price) {
 | 
	
		
			
				|  |  | +        row.price = 0;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      row.amount = Number(row.price) * Number(row.actualQuantity)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </script>
 |