|
|
@@ -7,35 +7,38 @@
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh add-customer-btn"
|
|
|
- style="right: 245px;"
|
|
|
- type="primary"
|
|
|
- @click="revokeOutGoods"
|
|
|
- v-if="form.deliveryStatus !== '录入'"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
- >撤销发货</el-button>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh add-customer-btn"
|
|
|
- style="right: 245px;"
|
|
|
- type="primary"
|
|
|
- @click="sendOutGoods"
|
|
|
- v-if="form.deliveryStatus == '录入'"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
- >确认发货</el-button>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh add-customer-btn"
|
|
|
- type="success" style="right: 140px;" @click="copyOrder"
|
|
|
- :disabled="detailData.seeDisabled">
|
|
|
- 复制新单
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh add-customer-btn"
|
|
|
+ <div class="add-customer-btn">
|
|
|
+ <el-button
|
|
|
+ class="el-button--small-yh"
|
|
|
+ style="right: 245px;"
|
|
|
+ type="primary"
|
|
|
+ @click="revokeOutGoods"
|
|
|
+ v-if="form.deliveryStatus !== '录入'"
|
|
|
+ :disabled="detailData.seeDisabled"
|
|
|
+ >撤销发货</el-button>
|
|
|
+ <el-button
|
|
|
+ class="el-button--small-yh"
|
|
|
+ style="right: 245px;"
|
|
|
+ type="primary"
|
|
|
+ @click="sendOutGoods"
|
|
|
+ v-if="form.deliveryStatus == '录入'"
|
|
|
+ :disabled="detailData.seeDisabled"
|
|
|
+ >确认发货</el-button>
|
|
|
+ <el-button
|
|
|
+ class="el-button--small-yh"
|
|
|
+ type="success" style="right: 140px;" @click="copyOrder"
|
|
|
+ :disabled="detailData.seeDisabled">
|
|
|
+ 复制新单
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ class="el-button--small-yh"
|
|
|
type="primary"
|
|
|
:disabled="disabled || detailData.seeDisabled"
|
|
|
@click="editCustomer(false)"
|
|
|
- >{{ form.id ? '确认修改' : '确认新增' }}
|
|
|
- </el-button>
|
|
|
+ :loading="saveLoading"
|
|
|
+ >{{ form.id ? '确认修改' : '确认新增' }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div style="margin-top: 60px">
|
|
|
<el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
|
|
|
@@ -53,6 +56,9 @@
|
|
|
<el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="item.disabled || detailData.seeDisabled">
|
|
|
<el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue" size="small"></el-option>
|
|
|
</el-select>
|
|
|
+ <el-select v-else-if="item.prop === 'warehouseType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
|
|
|
+ <el-option v-for="(item,index) in warehouseTypeOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
|
|
|
+ </el-select>
|
|
|
<!-- <avue-input-tree-->
|
|
|
<!-- v-else-if="item.prop === 'warehouseType'"-->
|
|
|
<!-- leaf-only-->
|
|
|
@@ -65,9 +71,8 @@
|
|
|
<!-- @change="warehouseTreeChange"-->
|
|
|
<!-- >-->
|
|
|
<!-- </avue-input-tree>-->
|
|
|
- <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
|
|
|
- <el-option v-for="(item,index) in warehouseName" :key="index" :label="item.cname" :value="item.id" size="small"></el-option>
|
|
|
- </el-select>
|
|
|
+ <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
|
|
|
+ :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled"/>
|
|
|
<el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -88,7 +93,7 @@
|
|
|
@saveColumn="saveColumn('goods')"
|
|
|
>
|
|
|
<template slot="code" slot-scope="{row,index}">
|
|
|
- <span style="float: left;padding-top: 2px">{{ row.code }}</span>
|
|
|
+ <span>{{ row.code }}</span>
|
|
|
<el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled">选择</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
@@ -109,10 +114,17 @@
|
|
|
>删 除</el-button>
|
|
|
</template>
|
|
|
<template slot="menuLeft" slot-scope="{size}">
|
|
|
+<!-- <el-button type="primary"-->
|
|
|
+<!-- icon="el-icon-plus"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- @click="commoditySelection"-->
|
|
|
+<!-- :disabled="detailData.seeDisabled"-->
|
|
|
+<!-- >录入明细-->
|
|
|
+<!-- </el-button>-->
|
|
|
<el-button type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
- @click="commoditySelection"
|
|
|
+ @click="marketDialog = true"
|
|
|
:disabled="detailData.seeDisabled"
|
|
|
>录入明细
|
|
|
</el-button>
|
|
|
@@ -142,7 +154,7 @@
|
|
|
@saveColumn="saveColumn('fees')"
|
|
|
>
|
|
|
<template slot="code" slot-scope="{row,index}">
|
|
|
- <span style="float: left;padding-top: 2px">{{ row.code }}</span>
|
|
|
+ <span>{{ row.code }}</span>
|
|
|
<el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled">选择</el-button>
|
|
|
</template>
|
|
|
<template slot="corpId" slot-scope="{ row }">
|
|
|
@@ -305,6 +317,25 @@
|
|
|
:disabled="tableDataCost.length !== 1">导入</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+<!-- 导入销售明细-->
|
|
|
+ <el-dialog
|
|
|
+ title="导入销售"
|
|
|
+ append-to-body
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="marketDialog"
|
|
|
+ width="60%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :modal-append-to-body='false'
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <market-detail
|
|
|
+ @importMarket="importMarket"
|
|
|
+ @close="closeMarkeDialog"
|
|
|
+ systemType="GN"
|
|
|
+ >
|
|
|
+ </market-detail>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -329,6 +360,7 @@ import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
|
|
|
import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
|
|
|
import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
+import marketDetail from "@/components/procurement/market";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
@@ -337,6 +369,9 @@ export default {
|
|
|
type: Object
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ marketDetail,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
configuration: {
|
|
|
@@ -346,6 +381,13 @@ export default {
|
|
|
placeholder: '请点击右边按钮选择',
|
|
|
dicData: []
|
|
|
},
|
|
|
+ configurationWarehouse: {
|
|
|
+ multipleChoices: false,
|
|
|
+ multiple: false,
|
|
|
+ collapseTags: false,
|
|
|
+ placeholder: "请点击右边按钮选择",
|
|
|
+ dicData: [],
|
|
|
+ },
|
|
|
form: {},
|
|
|
data: [],
|
|
|
loadingCost: false,
|
|
|
@@ -426,6 +468,7 @@ export default {
|
|
|
contactsData: [],
|
|
|
advantageProjectData: [],
|
|
|
disabled: false,
|
|
|
+ saveLoading: false,
|
|
|
bankOfDepositData: [],
|
|
|
tableDataCost: [],
|
|
|
dic: [],
|
|
|
@@ -574,6 +617,7 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
statusOption: [],
|
|
|
+ warehouseTypeOption: [],
|
|
|
// 仓库类型
|
|
|
warehouseType: [],
|
|
|
// 仓库名称
|
|
|
@@ -586,6 +630,8 @@ export default {
|
|
|
oldGoodsList: [],
|
|
|
oldFeesList: [],
|
|
|
oldUploadList: [],
|
|
|
+ // 导入销售订单明细
|
|
|
+ marketDialog: false,
|
|
|
}
|
|
|
},
|
|
|
//初始化查询
|
|
|
@@ -595,6 +641,9 @@ export default {
|
|
|
this.getWorkDicts("order_status").then(res => {
|
|
|
this.statusOption = res.data.data
|
|
|
})
|
|
|
+ this.getWorkDicts("warehouseType").then(res => {
|
|
|
+ this.warehouseTypeOption = res.data.data
|
|
|
+ })
|
|
|
this.$set(this.form,'deliveryStatus','录入')
|
|
|
wareHouseType().then(res => {
|
|
|
this.warehouseType = res.data.data.records
|
|
|
@@ -688,10 +737,12 @@ export default {
|
|
|
// 出库金额和出库数量的比例
|
|
|
this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
|
|
|
})
|
|
|
- console.log(this.contactsData)
|
|
|
if (this.form.companyName) {
|
|
|
this.configuration.dicData = this.configuration.dicData.concat(this.form.companyName)
|
|
|
}
|
|
|
+ if (this.form.storageMap) {
|
|
|
+ this.configurationWarehouse.dicData = this.form.storageMap
|
|
|
+ }
|
|
|
let feesData = []
|
|
|
this.form.deliveryFeesList.forEach(item => {
|
|
|
let a = {
|
|
|
@@ -755,6 +806,8 @@ export default {
|
|
|
})
|
|
|
this.form.deliveryStatus == '录入'
|
|
|
}
|
|
|
+ }).finally(() => {
|
|
|
+ this.saveLoading = false
|
|
|
});
|
|
|
},
|
|
|
// 出库数量变化时调用
|
|
|
@@ -1112,11 +1165,11 @@ export default {
|
|
|
if (typeof this.form.corpsTypeId == 'object') {
|
|
|
this.form.corpsTypeId = this.form.corpsTypeId.join(",")
|
|
|
}
|
|
|
- this.disabled = true
|
|
|
+ this.saveLoading = true
|
|
|
this.form.billType = 'FH'
|
|
|
typeSave(this.form).then(res => {
|
|
|
this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
|
|
|
- this.disabled = false
|
|
|
+ // this.disabled = false
|
|
|
if (isBack) {
|
|
|
//成功关闭此页面回到列表页
|
|
|
this.$emit("goBack");
|
|
|
@@ -1203,6 +1256,14 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 导入销售明细
|
|
|
+ importMarket(list) {
|
|
|
+ console.log(list)
|
|
|
+ },
|
|
|
+ // 关闭销售弹窗
|
|
|
+ closeMarkeDialog() {
|
|
|
+ this.marketDialog = false;
|
|
|
+ },
|
|
|
// 保存列设置
|
|
|
async saveColumn(name) {
|
|
|
/**
|