|
@@ -65,13 +65,28 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24" :sm="12" :lg="12" v-if="goodsList.length && commercialType">
|
|
|
+ <el-form-item label="计划单" prop="isPlanOrder">
|
|
|
+ <el-radio-group v-model="mainForm.isPlanOrder">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
|
|
|
<div class="main-title">
|
|
|
<div class="title">货品信息</div>
|
|
|
<div>
|
|
|
- <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px">
|
|
|
+ <el-select
|
|
|
+ v-model="warehouseValue"
|
|
|
+ placeholder="请选择发货仓库"
|
|
|
+ :disabled="!goodsList.length"
|
|
|
+ size="small"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ @change="handleWarehouseValue"
|
|
|
+ >
|
|
|
<el-option v-for="(item, index) in warehouseList" :key="index" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="checkStock">检查库存</el-button>
|
|
@@ -259,6 +274,7 @@
|
|
|
<!-- <div>{{ scope.row.status1 | status1Filter }}</div>-->
|
|
|
<!-- </template>-->
|
|
|
<!-- </el-table-column>-->
|
|
|
+ <el-table-column align="left" label="仓库" prop="correspondName" min-width="150" show-overflow-tooltip />
|
|
|
<el-table-column
|
|
|
v-if="!listItem"
|
|
|
align="left"
|
|
@@ -311,17 +327,17 @@
|
|
|
备注:{{ factor[0].remark }}
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="8" :lg="11">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
<el-form-item label="规格型号">
|
|
|
<div style="display: flex">
|
|
|
- <el-input v-model="screenForm.specification" placeholder="请输入型号规格型号" />
|
|
|
+ <el-input v-model="screenForm.specification" placeholder="请输入规格型号" />
|
|
|
<el-button style="margin-left: 10px" type="primary" size="mini" @click="handleGetPolicyList"
|
|
|
>查询</el-button
|
|
|
>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="11">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
<el-form-item label="销售政策" class="myselect">
|
|
|
<el-select
|
|
|
v-model="screenForm.policyId"
|
|
@@ -340,14 +356,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="8" :lg="11">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
<el-form-item label="规格型号">
|
|
|
<div style="display: flex">
|
|
|
<el-input v-model="screenForm.specifications" placeholder="请输入型号规格型号" />
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="11">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
<el-form-item label="销售类型">
|
|
|
<el-select
|
|
|
v-model="screenForm.saleTypeCode"
|
|
@@ -360,8 +376,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :xs="22" :sm="22" :lg="22" class="tr">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
+ <el-form-item label="价格类型">
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-input v-model="screenForm.priceType" placeholder="请输入价格类型" />
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="22" :sm="22" :lg="12" class="tr">
|
|
|
<!-- <el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
@@ -434,7 +456,7 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <template v-if="col.lable == '产品名称' || col.lable == '规格型号'">
|
|
|
+ <template v-if="col.lable == '产品名称' || col.lable == '规格型号' || col.lable == '价格类型'">
|
|
|
<CopyButton :copy-text="scope.row[col.prop]" />
|
|
|
<span> {{ scope.row[col.prop] }}</span>
|
|
|
</template>
|
|
@@ -451,6 +473,7 @@
|
|
|
<el-col />
|
|
|
<el-col />
|
|
|
<el-col />
|
|
|
+ <el-col />
|
|
|
<el-col>{{ totalArr[index].totalQty }}</el-col>
|
|
|
<el-col>{{ totalArr[index].totalPrice | numToFixed }}</el-col>
|
|
|
<el-col>{{ totalArr[index].totalAmount | numToFixed }}</el-col>
|
|
@@ -541,7 +564,7 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <template v-if="col.lable == '产品名称' || col.lable == '规格型号'">
|
|
|
+ <template v-if="col.lable == '产品名称' || col.lable == '规格型号' || col.lable == '价格类型'">
|
|
|
<CopyButton :copy-text="scope.row[col.prop]" />
|
|
|
<span> {{ scope.row[col.prop] }}</span>
|
|
|
</template>
|
|
@@ -558,6 +581,7 @@
|
|
|
<el-col />
|
|
|
<el-col />
|
|
|
<el-col />
|
|
|
+ <el-col />
|
|
|
<el-col>{{ totalQty }}</el-col>
|
|
|
<el-col>{{ totalPrice | numToFixed }}</el-col>
|
|
|
<el-col>{{ totalAmount | numToFixed }}</el-col>
|
|
@@ -641,6 +665,7 @@ export default {
|
|
|
remark: '',
|
|
|
fileNum: '',
|
|
|
policyCode: '',
|
|
|
+ isPlanOrder: '',
|
|
|
policyRemark: '',
|
|
|
policyId: '',
|
|
|
k3ServiceId: '',
|
|
@@ -658,10 +683,10 @@ export default {
|
|
|
saleTypeCode: '',
|
|
|
factorId: '',
|
|
|
specification: '',
|
|
|
+ priceType: '',
|
|
|
specifications: ''
|
|
|
},
|
|
|
- currentPage: 1,
|
|
|
- listTotal: 0,
|
|
|
+
|
|
|
salesTypeList: [],
|
|
|
typeList: [],
|
|
|
ztypeList: [],
|
|
@@ -692,6 +717,12 @@ export default {
|
|
|
widht: 350,
|
|
|
align: 'left'
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'priceType',
|
|
|
+ lable: '价格类型',
|
|
|
+ widht: 200,
|
|
|
+ align: 'left'
|
|
|
+ },
|
|
|
|
|
|
{
|
|
|
prop: 'qty',
|
|
@@ -738,7 +769,10 @@ export default {
|
|
|
totalArr: [],
|
|
|
type: 1,
|
|
|
newMultipleSelections: [],
|
|
|
- remark: ''
|
|
|
+ remark: '',
|
|
|
+ commercialType: false,
|
|
|
+ correspondName: '',
|
|
|
+ correspondId: ''
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -806,6 +840,10 @@ export default {
|
|
|
handler(newValue, oldValue) {
|
|
|
if (newValue && newValue.length) {
|
|
|
newValue.forEach((item, index) => {
|
|
|
+ if (this.correspondId) {
|
|
|
+ this.goodsList[index].correspondName = this.correspondName
|
|
|
+ this.goodsList[index].correspondId = this.correspondId
|
|
|
+ }
|
|
|
this.goodsList[index].compute_amount = item.price * item.qty
|
|
|
this.goodsList[index].compute_flAmount =
|
|
|
((item.price - item.discAmount) * item.qty * (item.rebateRate * 100)) / 100
|
|
@@ -903,6 +941,18 @@ export default {
|
|
|
goBack() {
|
|
|
this.$emit('backListFormDetail')
|
|
|
},
|
|
|
+ handleWarehouseValue(e) {
|
|
|
+ if (!this.goodsList.length) return
|
|
|
+ this.correspondName = this.warehouseList.find(k => {
|
|
|
+ return k.id === e
|
|
|
+ }).name
|
|
|
+ this.correspondId = e
|
|
|
+ this.goodsList.forEach(k => {
|
|
|
+ this.$set(k, 'correspondName', this.correspondName)
|
|
|
+ this.$set(k, 'correspondId', this.correspondId)
|
|
|
+ })
|
|
|
+ console.log(this.goodsList)
|
|
|
+ },
|
|
|
|
|
|
handleWallets(e, row, index) {
|
|
|
if (e) {
|
|
@@ -936,11 +986,13 @@ export default {
|
|
|
this.dataList = []
|
|
|
this.popDataArr = []
|
|
|
this.screenForm.saleTypeCode = ''
|
|
|
- const type = this.policyList.filter(k => {
|
|
|
+
|
|
|
+ const policy = this.policyList.filter(k => {
|
|
|
return k.code === e
|
|
|
- })[0].type
|
|
|
- console.log(type == 'PROVISION')
|
|
|
- if (type == 'PROVISION') {
|
|
|
+ })[0]
|
|
|
+ this.commercialType = policy.commercialType
|
|
|
+ console.log(policy.type)
|
|
|
+ if (policy.type == 'PROVISION') {
|
|
|
// PROVISION 配提
|
|
|
// 选择销售政策PolidcyId改变获取条件列表
|
|
|
const { data } = await getPolicyConditionList({ policyId: e })
|
|
@@ -1020,6 +1072,7 @@ export default {
|
|
|
policyConditionId,
|
|
|
popType,
|
|
|
status: true,
|
|
|
+ priceType: this.screenForm.priceType,
|
|
|
specification: this.screenForm.specifications,
|
|
|
saleTypeCode: this.screenForm.saleTypeCode,
|
|
|
customerId: JSON.parse(localStorage.getItem('supply_user')).customerId
|
|
@@ -1090,6 +1143,7 @@ export default {
|
|
|
pageSize: -1,
|
|
|
policyId: this.screenForm.policyId,
|
|
|
saleTypeCode: this.screenForm.saleTypeCode,
|
|
|
+ priceType: this.screenForm.priceType,
|
|
|
specification: this.screenForm.specifications,
|
|
|
status: true,
|
|
|
customerId: JSON.parse(localStorage.getItem('supply_user')).customerId,
|
|
@@ -1369,12 +1423,19 @@ export default {
|
|
|
this.mainForm.type = data.mainId
|
|
|
this.mainForm.remark = data.remark
|
|
|
this.mainForm.policyId = data.policyId
|
|
|
+ this.mainForm.isPlanOrder = data.isPlanOrder
|
|
|
+ this.commercialType = data.commercialType
|
|
|
+ this.correspondId = data.correspondId
|
|
|
+ this.correspondName = data.correspondName
|
|
|
+ this.warehouseValue = data.correspondId
|
|
|
this.policyId = data.policyId
|
|
|
this.mainForm.k3ServiceName = data.k3ServiceName
|
|
|
;(this.mainForm.k3ServiceId = data.k3ServiceId), (this.mainForm.fileNum = data.fileNum)
|
|
|
// this.mainForm.k3ServiceName = data.retailOrderItemList[0].wallets[0].serviceName
|
|
|
// this.mainForm.k3ServiceId = data.retailOrderItemList[0].wallets[0].serviceId
|
|
|
data.retailOrderItemList.forEach(item => {
|
|
|
+ item.correspondName = data.correspondName
|
|
|
+ item.warehouseValue = data.correspondId
|
|
|
item.status1 = ''
|
|
|
item.status2 = ''
|
|
|
item.sums1 = ['qty', 'directTransferQty']
|
|
@@ -1770,10 +1831,18 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
if (hasCustomerWalletId) return
|
|
|
+ if (this.commercialType && !this.mainForm.isPlanOrder && !this.correspondId) {
|
|
|
+ this.$errorMsg(`仓库必选`)
|
|
|
+ return
|
|
|
+ }
|
|
|
const params = {
|
|
|
theTime: this.mainForm.date,
|
|
|
k3ServiceId: this.mainForm.k3ServiceId,
|
|
|
k3ServiceName: this.mainForm.k3ServiceName,
|
|
|
+ isPlanOrder: this.mainForm.isPlanOrder,
|
|
|
+ commercialType: this.commercialType,
|
|
|
+ correspondName: this.correspondName,
|
|
|
+ correspondId: this.correspondId,
|
|
|
remark: this.mainForm.remark,
|
|
|
type: 2, // 1:普通零售单,2:政策零售单
|
|
|
retailOrderItemList: this.goodsList,
|
|
@@ -1782,7 +1851,6 @@ export default {
|
|
|
}
|
|
|
console.log(params)
|
|
|
if (this.listItem) {
|
|
|
- console.log(params.listItem)
|
|
|
params.id = this.listItem.id
|
|
|
editData(params).then(res => {
|
|
|
this.$successMsg('编辑成功')
|