|
@@ -26,8 +26,8 @@
|
|
|
<!-- ></avue-input-tree>-->
|
|
|
<el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
|
|
|
size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
|
|
|
- <el-input v-else-if="item.prop === 'corpId'" disabled placeholder="请输入内容" v-model="form.corpName" class="input-with-select">
|
|
|
- <el-button slot="append" icon="el-icon-edit" @click="$refs.selectComponent.dialogVisible = true" ></el-button>
|
|
|
+ <el-input v-else-if="item.prop === 'corpId'" disabled placeholder="请选择内容" v-model="form.corpName" class="input-with-select">
|
|
|
+ <el-button slot="append" icon="el-icon-edit" @click="$refs.selectComponent.dialogVisible = true;this.customerDivide = 'corpId'" ></el-button>
|
|
|
</el-input>
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
@@ -41,6 +41,9 @@
|
|
|
<el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
|
|
|
<el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
|
|
|
size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
|
|
|
+ <el-input v-else-if="item.prop === 'belongToCorpId'" disabled placeholder="请选择内容" v-model="form.corpName" class="input-with-select">
|
|
|
+ <el-button slot="append" icon="el-icon-edit" @click="$refs.selectComponent.dialogVisible = true;this.customerDivide = 'belongToCorpId'" ></el-button>
|
|
|
+ </el-input>
|
|
|
<el-input v-else type="age" v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -56,6 +59,7 @@
|
|
|
@row-save="rowSave"
|
|
|
@row-click="handleRowClick"
|
|
|
@row-update="rowUpdate"
|
|
|
+ @selection-change="productSelection"
|
|
|
@row-del="rowDel"
|
|
|
>
|
|
|
<template slot="code" slot-scope="{row,index}">
|
|
@@ -81,6 +85,12 @@
|
|
|
size="small"
|
|
|
@click="policy">政策
|
|
|
</el-button>
|
|
|
+ <el-button type="warning"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="small"
|
|
|
+ :disabled="selection.length < 1"
|
|
|
+ @click="generateShipmentD">生成发货单
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -401,7 +411,8 @@ import {
|
|
|
corpsfiles,
|
|
|
corpsitem,
|
|
|
getList,
|
|
|
- detailList
|
|
|
+ detailList,
|
|
|
+ generateShipment
|
|
|
} from "@/api/basicData/configuration"
|
|
|
import customerContact from "./configuration/customerContact.json"
|
|
|
import advantageProject from "./configuration/advantageProject.json"
|
|
@@ -424,6 +435,7 @@ export default {
|
|
|
dataPolicy: [],
|
|
|
contactsDataBuyFree: [],
|
|
|
loadingCost: false,
|
|
|
+ customerDivide: '',
|
|
|
choiceData: false,
|
|
|
commodityData: false,
|
|
|
dataCost: [],
|
|
@@ -529,6 +541,7 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
policyDialog: false,
|
|
|
advantageProjectForm: {},
|
|
|
+ selection:[],
|
|
|
bankOfDepositForm: {},
|
|
|
contactsData: [],
|
|
|
advantageProjectData: [],
|
|
@@ -953,9 +966,13 @@ export default {
|
|
|
//选择客户触发
|
|
|
selectCustomer(selection){
|
|
|
console.log(selection)
|
|
|
- this.$set(this.form,"corpId",selection[0].id)
|
|
|
- this.$set(this.form,"corpName",selection[0].cname)
|
|
|
- console.log(this.form)
|
|
|
+ if (this.customerDivide = 'corpId'){
|
|
|
+ this.$set(this.form,"corpId",selection[0].id)
|
|
|
+ this.$set(this.form,"corpName",selection[0].cname)
|
|
|
+ }else if (this.customerDivide = 'belongToCorpId'){
|
|
|
+ this.$set(this.form,"belongToCorpId",selection[0].id)
|
|
|
+ this.$set(this.form,"belongToCorpName",selection[0].cname)
|
|
|
+ }
|
|
|
},
|
|
|
//点击行可编辑
|
|
|
handleRowClick(row, event, column) {
|
|
@@ -985,6 +1002,43 @@ export default {
|
|
|
policy(){
|
|
|
this.policyDialog = !this.policyDialog
|
|
|
},
|
|
|
+ //生成发货单
|
|
|
+ generateShipmentD(){
|
|
|
+ let lsit = []
|
|
|
+ for (let item in this.selection){
|
|
|
+ if (!this.selection[item].id){
|
|
|
+ return this.$confirm('商品信息有未保存数据, 是否立即保存?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.editCustomer()
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ lsit.push(this.selection[item].id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ id:this.form.id,
|
|
|
+ orderItemIds: lsit
|
|
|
+ }
|
|
|
+ generateShipment(data).then(res=>{
|
|
|
+ console.log(res.data.data)
|
|
|
+ this.$router.push({
|
|
|
+ path: "deliveryNotice_detailsPageEdit",
|
|
|
+ query: {form: JSON.stringify(res.data.data)},
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //商品选中触发
|
|
|
+ productSelection(selection){
|
|
|
+ this.selection = selection
|
|
|
+ },
|
|
|
//点击费用明细选择触发
|
|
|
choice(row) {
|
|
|
this.dialogCost = !this.dialogCost
|