|
@@ -35,7 +35,7 @@
|
|
|
<el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
|
|
|
</el-select>
|
|
|
<selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
|
|
|
- :configuration="configuration"/>
|
|
|
+ :configuration="configuration" style="width: 100%"/>
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -52,6 +52,7 @@
|
|
|
@row-click="handleRowClick"
|
|
|
@row-update="rowUpdate"
|
|
|
@row-del="rowDel"
|
|
|
+ @selection-change="productSelection"
|
|
|
>
|
|
|
<template slot="orderQuantity" slot-scope="{ row }">
|
|
|
<el-input
|
|
@@ -88,7 +89,13 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
@click="commoditySelection"
|
|
|
- >新增
|
|
|
+ >录入明细
|
|
|
+ </el-button>
|
|
|
+ <el-button type="warning"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="small"
|
|
|
+ :disabled="selection.length < 1"
|
|
|
+ @click="generateShipmentC">生成发货单
|
|
|
</el-button>
|
|
|
<el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
|
|
|
</template>
|
|
@@ -129,7 +136,7 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
@click="costIncrease"
|
|
|
- >新增
|
|
|
+ >录入明细
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -373,7 +380,8 @@ import {
|
|
|
corpsitem,
|
|
|
getList,
|
|
|
getDeptLazyTreeS,
|
|
|
- getSysNo
|
|
|
+ getSysNo,
|
|
|
+ generateShipment
|
|
|
} from "@/api/basicData/purchaseOrder"
|
|
|
import customerContact from "./configuration/customerContact.json"
|
|
|
import advantageProject from "./configuration/advantageProject.json"
|
|
@@ -593,6 +601,7 @@ export default {
|
|
|
paymentOption: [],
|
|
|
maxFeeNum: 0,
|
|
|
maxGoodsNum: 0,
|
|
|
+ selection: [],
|
|
|
}
|
|
|
},
|
|
|
//初始化查询
|
|
@@ -697,6 +706,39 @@ export default {
|
|
|
copyOrder() {
|
|
|
this.queryData(this.form.id, true)
|
|
|
},
|
|
|
+ //生成收货单
|
|
|
+ generateShipmentC() {
|
|
|
+ let lsit = []
|
|
|
+ for (let item in this.selection) {
|
|
|
+ if (!this.selection[item].id) {
|
|
|
+ return this.$confirm('商品信息有未保存数据, 是否立即保存?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.editCustomer(false)
|
|
|
+ }).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: "/businessManagement/receipt/index",
|
|
|
+ query: {form: JSON.stringify(res.data.data)},
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
//点击行可编辑
|
|
|
handleRowClick(row, event, column) {
|
|
|
console.log(row.$index)
|
|
@@ -711,6 +753,10 @@ export default {
|
|
|
console.log(row)
|
|
|
this.$refs.crudProject.rowCell(row, index)
|
|
|
},
|
|
|
+ //商品选中触发
|
|
|
+ productSelection(selection) {
|
|
|
+ this.selection = selection
|
|
|
+ },
|
|
|
//费用新增触发
|
|
|
costIncrease() {
|
|
|
this.dialogCost = !this.dialogCost
|