|  | @@ -16,6 +16,12 @@
 | 
	
		
			
				|  |  |              size="small"
 | 
	
		
			
				|  |  |              @click="editCustomer">保存数据
 | 
	
		
			
				|  |  |          </el-button>
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +            class="el-button--small-yh"
 | 
	
		
			
				|  |  | +            type="primary"
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +            @click="generateOutbound">生成出库任务
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div style="margin-top: 50px">
 | 
	
	
		
			
				|  | @@ -38,8 +44,8 @@
 | 
	
		
			
				|  |  |                  <el-button
 | 
	
		
			
				|  |  |                      :size="size" :disabled="disabled" :type="type"
 | 
	
		
			
				|  |  |                      :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
 | 
	
		
			
				|  |  | -                    @click="$refs.formContacts.rowCell(row,index)"
 | 
	
		
			
				|  |  | -                >{{ row.$cellEdit ? '确认' : '修改' }}
 | 
	
		
			
				|  |  | +                    @click="$refs.formContacts.rowEdit(row,index)"
 | 
	
		
			
				|  |  | +                >编辑
 | 
	
		
			
				|  |  |                  </el-button>
 | 
	
		
			
				|  |  |                  <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
 | 
	
		
			
				|  |  |                             @click="rowDelBox(row,index,'orderItemsList')">删除
 | 
	
	
		
			
				|  | @@ -94,7 +100,7 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import {getDetails, submit} from "@/api/tirePartsMall/salesManagement/saleOrder";
 | 
	
		
			
				|  |  | +import {getDetails, submit, generateShipTask} from "@/api/tirePartsMall/salesManagement/saleOrder";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "detailsPage",
 | 
	
	
		
			
				|  | @@ -102,7 +108,7 @@ export default {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        activeName: "sale_detail",
 | 
	
		
			
				|  |  |        disabled: false,
 | 
	
		
			
				|  |  | -      key:0,
 | 
	
		
			
				|  |  | +      key: 0,
 | 
	
		
			
				|  |  |        form: {
 | 
	
		
			
				|  |  |          orderItemsList: [],
 | 
	
		
			
				|  |  |          paymentRecordsList: [],
 | 
	
	
		
			
				|  | @@ -119,6 +125,15 @@ export default {
 | 
	
		
			
				|  |  |              label: 'cname',
 | 
	
		
			
				|  |  |              value: 'id'
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  | +          change:(data)=>{
 | 
	
		
			
				|  |  | +            if (this.$refs.form.DIC.customerId || data.value){
 | 
	
		
			
				|  |  | +              for (let item of this.$refs.form.DIC.customerId){
 | 
	
		
			
				|  |  | +                if (item.id == data.value){
 | 
	
		
			
				|  |  | +                  //   后端返回数据暂无联系人、地址等数据,无法下拉默认
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  |            dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH',
 | 
	
		
			
				|  |  |            rules: [{
 | 
	
		
			
				|  |  |              required: true,
 | 
	
	
		
			
				|  | @@ -140,22 +155,25 @@ export default {
 | 
	
		
			
				|  |  |              trigger: "blur"
 | 
	
		
			
				|  |  |            }]
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  | -          label: '收货地址',
 | 
	
		
			
				|  |  | -          prop: "recAddress",
 | 
	
		
			
				|  |  | -          rules: [{
 | 
	
		
			
				|  |  | -            required: true,
 | 
	
		
			
				|  |  | -            message: " ",
 | 
	
		
			
				|  |  | -            trigger: "blur"
 | 
	
		
			
				|  |  | -          }]
 | 
	
		
			
				|  |  | -        }, {
 | 
	
		
			
				|  |  |            label: '单据编号',
 | 
	
		
			
				|  |  |            prop: "ordNo",
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '来源单号',
 | 
	
		
			
				|  |  |            prop: "srcOrdNo",
 | 
	
		
			
				|  |  | +          disabled: true
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '业务来源',
 | 
	
		
			
				|  |  | +          prop: "businessSource",
 | 
	
		
			
				|  |  | +          disabled: true
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '应收类别',
 | 
	
		
			
				|  |  |            prop: "receivableType",
 | 
	
		
			
				|  |  | +          type: "select",
 | 
	
		
			
				|  |  | +          dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
 | 
	
		
			
				|  |  | +          props: {
 | 
	
		
			
				|  |  | +            label: "dictValue",
 | 
	
		
			
				|  |  | +            value: "dictValue"
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '联系人',
 | 
	
		
			
				|  |  |            prop: "contacts",
 | 
	
	
		
			
				|  | @@ -163,12 +181,41 @@ export default {
 | 
	
		
			
				|  |  |            label: '电话',
 | 
	
		
			
				|  |  |            prop: "phone",
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  | +          label: '收货地址',
 | 
	
		
			
				|  |  | +          prop: "recAddress",
 | 
	
		
			
				|  |  | +          type: 'select',
 | 
	
		
			
				|  |  | +          props: {
 | 
	
		
			
				|  |  | +            label: 'address',
 | 
	
		
			
				|  |  | +            value: 'id'
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          dicUrl: '/api/blade-sales-part/corpsAddr/corpsAddrList',
 | 
	
		
			
				|  |  | +          rules: [{
 | 
	
		
			
				|  |  | +            required: true,
 | 
	
		
			
				|  |  | +            message: " ",
 | 
	
		
			
				|  |  | +            trigger: "blur"
 | 
	
		
			
				|  |  | +          }]
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  |            label: '配送方式',
 | 
	
		
			
				|  |  |            prop: "shipType",
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '物流公司',
 | 
	
		
			
				|  |  |            prop: "logisticsCorpName"
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  | +          label: '成本',
 | 
	
		
			
				|  |  | +          prop: "cost"
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '毛利',
 | 
	
		
			
				|  |  | +          prop: "grossProfit"
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '销售金额',
 | 
	
		
			
				|  |  | +          prop: "salesAmount"
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '运费',
 | 
	
		
			
				|  |  | +          prop: "freight"
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '总金额',
 | 
	
		
			
				|  |  | +          prop: "totalMoney"
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  |            label: '备注',
 | 
	
		
			
				|  |  |            prop: "remarks",
 | 
	
		
			
				|  |  |            type: 'textarea',
 | 
	
	
		
			
				|  | @@ -185,10 +232,10 @@ export default {
 | 
	
		
			
				|  |  |          addBtnText: "录入明细",
 | 
	
		
			
				|  |  |          refreshBtn: false,
 | 
	
		
			
				|  |  |          dialogDrag: true,
 | 
	
		
			
				|  |  | -        addBtn: false,
 | 
	
		
			
				|  |  | +        addBtn: true,
 | 
	
		
			
				|  |  |          span: 8,
 | 
	
		
			
				|  |  |          height: 500,
 | 
	
		
			
				|  |  | -        addRowBtn: true,
 | 
	
		
			
				|  |  | +        addRowBtn: false,
 | 
	
		
			
				|  |  |          editBtn: false,
 | 
	
		
			
				|  |  |          delBtn: false,
 | 
	
		
			
				|  |  |          menuWidth: 140,
 | 
	
	
		
			
				|  | @@ -197,38 +244,45 @@ export default {
 | 
	
		
			
				|  |  |          column: [{
 | 
	
		
			
				|  |  |            label: '物料编码',
 | 
	
		
			
				|  |  |            prop: 'goodsNo',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '商品名称',
 | 
	
		
			
				|  |  |            prop: 'goodsId',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 200,
 | 
	
		
			
				|  |  | +          overHidden: true,
 | 
	
		
			
				|  |  | +          type: 'select',
 | 
	
		
			
				|  |  | +          props: {
 | 
	
		
			
				|  |  | +            label: 'cname',
 | 
	
		
			
				|  |  | +            value: 'id'
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '品牌',
 | 
	
		
			
				|  |  | -          prop: 'bandr',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          prop: 'brandId',
 | 
	
		
			
				|  |  | +          width: 100,
 | 
	
		
			
				|  |  | +          overHidden: true,
 | 
	
		
			
				|  |  | +          type: 'select',
 | 
	
		
			
				|  |  | +          props: {
 | 
	
		
			
				|  |  | +            label: 'cname',
 | 
	
		
			
				|  |  | +            value: 'id'
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          dicUrl: '/api/blade-sales-part/brandDesc/listAll'
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '规格型号',
 | 
	
		
			
				|  |  |            prop: 'propertyName',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '花纹',
 | 
	
		
			
				|  |  |            prop: 'pattern',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '商品描述',
 | 
	
		
			
				|  |  |            prop: 'goodsDescription',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '数量',
 | 
	
		
			
				|  |  |            prop: 'goodsNum',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '单位',
 | 
	
		
			
				|  |  |            prop: 'units',
 | 
	
	
		
			
				|  | @@ -238,33 +292,35 @@ export default {
 | 
	
		
			
				|  |  |              value: "dictValue"
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '价格',
 | 
	
		
			
				|  |  |            prop: 'price',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '发货数量',
 | 
	
		
			
				|  |  |            prop: 'sendNum',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '利润',
 | 
	
		
			
				|  |  |            prop: 'profit',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '小计',
 | 
	
		
			
				|  |  |            prop: 'subTotalMoney',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '返利',
 | 
	
		
			
				|  |  |            prop: 'thisAmount',
 | 
	
		
			
				|  |  | -          width:100,
 | 
	
		
			
				|  |  | -          cell: true
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '成本',
 | 
	
		
			
				|  |  | +          prop: 'costprie',
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  | +          label: '毛利',
 | 
	
		
			
				|  |  | +          prop: 'grossProfit',
 | 
	
		
			
				|  |  | +          width: 100
 | 
	
		
			
				|  |  |          }]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        optionPaymentDetails: {},
 | 
	
	
		
			
				|  | @@ -357,6 +413,25 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    generateOutbound() {
 | 
	
		
			
				|  |  | +      this.$refs["form"].validate((valid, done) => {
 | 
	
		
			
				|  |  | +        done();
 | 
	
		
			
				|  |  | +        if (valid) {
 | 
	
		
			
				|  |  | +          const loading = this.$loading({
 | 
	
		
			
				|  |  | +            lock: true,
 | 
	
		
			
				|  |  | +            text: '加载中',
 | 
	
		
			
				|  |  | +            spinner: 'el-icon-loading',
 | 
	
		
			
				|  |  | +            background: 'rgba(255,255,255,0.7)'
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          generateShipTask(this.form).then(res=>{
 | 
	
		
			
				|  |  | +            this.$message.success("生成出库任务成功");
 | 
	
		
			
				|  |  | +            loading.close();
 | 
	
		
			
				|  |  | +          }).finally(() => {
 | 
	
		
			
				|  |  | +            loading.close();
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      //修改提交触发
 | 
	
		
			
				|  |  |      editCustomer() {
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid, done) => {
 | 
	
	
		
			
				|  | @@ -369,7 +444,7 @@ export default {
 | 
	
		
			
				|  |  |              background: 'rgba(255,255,255,0.7)'
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  |            submit({
 | 
	
		
			
				|  |  | -            bsType:"XS",
 | 
	
		
			
				|  |  | +            bsType: "XS",
 | 
	
		
			
				|  |  |              ...this.form
 | 
	
		
			
				|  |  |            }).then(res => {
 | 
	
		
			
				|  |  |              this.$message.success("保存成功");
 | 
	
	
		
			
				|  | @@ -396,7 +471,7 @@ export default {
 | 
	
		
			
				|  |  |          loading.close();
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    rowDelBox(row, index,type) {
 | 
	
		
			
				|  |  | +    rowDelBox(row, index, type) {
 | 
	
		
			
				|  |  |        this.$confirm("确定将选择数据删除?", {
 | 
	
		
			
				|  |  |          confirmButtonText: "确定",
 | 
	
		
			
				|  |  |          cancelButtonText: "取消",
 |