|
@@ -85,7 +85,7 @@
|
|
|
<containerTitle title="基础资料"></containerTitle>
|
|
|
<basic-container :showBtn="true">
|
|
|
<el-row>
|
|
|
- <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
|
|
|
+ <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8" :class="{isShow: item.display}">
|
|
|
<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" :disabled="detailData.seeDisabled || browse"/>
|
|
@@ -148,6 +148,28 @@
|
|
|
:disabled="item.disabled || detailData.seeDisabled || browse"
|
|
|
v-model.trim="form[item.prop]"
|
|
|
/>
|
|
|
+ <span v-else-if="item.type == 'radio'">
|
|
|
+ <el-radio
|
|
|
+ size="small"
|
|
|
+ :disabled="item.disabled || detailData.seeDisabled || browse"
|
|
|
+ v-model.trim="form[item.prop]"
|
|
|
+ :label="1"
|
|
|
+ >含</el-radio>
|
|
|
+ <el-radio
|
|
|
+ size="small"
|
|
|
+ :disabled="item.disabled || detailData.seeDisabled || browse"
|
|
|
+ v-model.trim="form[item.prop]"
|
|
|
+ :label="0"
|
|
|
+ >不含</el-radio>
|
|
|
+ </span>
|
|
|
+ <el-select v-else-if="item.prop === 'chargeMember'"
|
|
|
+ v-model="form[item.prop]" placeholder="请选择"
|
|
|
+ filterable
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="detailData.seeDisabled || browse">
|
|
|
+ <el-option v-for="(item,index) in userList" :key="index" :label="item.realName" :value="item.realName"></el-option>
|
|
|
+ </el-select>
|
|
|
<el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
|
|
|
<el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || browse" clearable></el-input>
|
|
|
</el-form-item>
|
|
@@ -157,7 +179,7 @@
|
|
|
<containerTitle title="发货信息"></containerTitle>
|
|
|
<basic-container :showBtn="true">
|
|
|
<el-row>
|
|
|
- <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
|
|
|
+ <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8" :class="{isShow: item.display == false}">
|
|
|
<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" :disabled="item.disabled || detailData.seeDisabled || browse"/>
|
|
|
<el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
|
|
@@ -176,10 +198,10 @@
|
|
|
<el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
|
|
|
</el-select>
|
|
|
<el-input type="age" v-else-if="item.prop === 'grossProfitRate'" v-model.trim="form[item.prop]" size="small" autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled || browse" v-input-limit="2">
|
|
|
- <template slot="append">%</template>
|
|
|
+ <template slot="append">%</template>
|
|
|
</el-input>
|
|
|
<el-input type="age" v-else-if="item.prop === 'specialOfferOf'" v-model.trim="form[item.prop]" size="small" autocomplete="off" placeholder="请输入" :disabled="detailData.seeDisabled || browse" v-input-limit="2">
|
|
|
- <template slot="append">%</template>
|
|
|
+ <template slot="append">%</template>
|
|
|
</el-input>
|
|
|
<el-input
|
|
|
v-else-if="item.type == 'number'"
|
|
@@ -770,6 +792,7 @@ import {
|
|
|
IntegerFormat
|
|
|
} from "@/util/validate";
|
|
|
import financialAccount from "../../../components/finance/financialAccount";
|
|
|
+import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -1007,7 +1030,7 @@ export default {
|
|
|
}, {
|
|
|
label: '产生返利',
|
|
|
prop: 'createProfit',
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -1119,6 +1142,7 @@ export default {
|
|
|
}, {
|
|
|
label: '毛利率',
|
|
|
prop: 'grossProfitRate',
|
|
|
+ display: true,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -1130,6 +1154,7 @@ export default {
|
|
|
label: '毛利额',
|
|
|
prop: 'grossProfit',
|
|
|
type: 'number',
|
|
|
+ display: true,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -1381,7 +1406,18 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '是否包含标签',
|
|
|
+ prop: 'isLabel',
|
|
|
+ type: 'radio',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '是否包含运费',
|
|
|
+ prop: 'isFreight',
|
|
|
+ type: 'radio',
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '预估运费',
|
|
|
prop: 'predictOceanFreight',
|
|
|
type: 'number',
|
|
@@ -1392,7 +1428,8 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '要求发货日期',
|
|
|
prop: 'requiredDeliveryDate',
|
|
|
type: 'date',
|
|
@@ -1414,6 +1451,16 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
+ },{
|
|
|
+ label: '业务员',
|
|
|
+ prop: 'chargeMember',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'change'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}, {
|
|
|
label: "订单备注",
|
|
|
type: 'textarea',
|
|
@@ -1473,6 +1520,8 @@ export default {
|
|
|
packageOptions: [],
|
|
|
// 请核状态禁用
|
|
|
browse: false,
|
|
|
+ roleName: '',
|
|
|
+ userList: [],
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -1503,32 +1552,21 @@ export default {
|
|
|
this.getWorkDicts("packageRemarks").then(res => {
|
|
|
this.packageOptions = res.data.data;
|
|
|
});
|
|
|
- this.$set(this.form, 'orderStatus', '录入')
|
|
|
- this.$set(this.form, 'caseOverPayment', 0)
|
|
|
- this.$set(this.form, 'overPayment', 0)
|
|
|
- this.$set(this.form, 'orderAmount', 0)
|
|
|
- this.$set(this.form, 'predictOceanFreight', 0)
|
|
|
- this.$set(this.form, 'presenterIntegral' , 0)
|
|
|
- this.$set(this.form, 'convertIntegral' , 0)
|
|
|
- this.$set(this.form, 'profit' , 0)
|
|
|
- this.$set(this.form, 'paymentType', '预付')
|
|
|
- this.$set(this.form, 'thisUsedProfit' , 0)
|
|
|
- this.$set(this.form, 'createProfit' , 0)
|
|
|
- let date = new Date();
|
|
|
- let year = date.getFullYear();
|
|
|
- let month = date.getMonth() + 1;
|
|
|
- let day = date.getDate();
|
|
|
- if (month < 10) {
|
|
|
- month = "0" + month;
|
|
|
- }
|
|
|
- if (day < 10) {
|
|
|
- day = "0" + day;
|
|
|
+ // 获取角色
|
|
|
+ this.roleName = localStorage.getItem('roleName')
|
|
|
+ if (this.roleName !== 'admin') {
|
|
|
+ this.contactInformation.column.forEach(item => {
|
|
|
+ if (item.prop == 'grossProfitRate' || item.prop == 'grossProfit') item.display = false
|
|
|
+ })
|
|
|
}
|
|
|
- let nowDate = year + "-" + month + "-" + day + ' 00:00:00';
|
|
|
- this.$set(this.form, 'businesDate', nowDate)
|
|
|
+ this.getDefault()
|
|
|
if (this.detailData.id) {
|
|
|
this.queryData(this.detailData.id)
|
|
|
}
|
|
|
+ gainUser().then(res => {
|
|
|
+ this.userList = res.data.data;
|
|
|
+ console.log(this.userList)
|
|
|
+ });
|
|
|
if (this.detailData.seeDisabled) {
|
|
|
// this.bankOfDeposit.column.forEach(item => {
|
|
|
// item.editDisabled = true
|
|
@@ -1666,6 +1704,33 @@ export default {
|
|
|
this.pageLoading = false
|
|
|
});
|
|
|
},
|
|
|
+ getDefault() {
|
|
|
+ let date = new Date();
|
|
|
+ let year = date.getFullYear();
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
+ let day = date.getDate();
|
|
|
+ if (month < 10) {
|
|
|
+ month = "0" + month;
|
|
|
+ }
|
|
|
+ if (day < 10) {
|
|
|
+ day = "0" + day;
|
|
|
+ }
|
|
|
+ let nowDate = year + "-" + month + "-" + day + ' 00:00:00';
|
|
|
+ this.$set(this.form, 'businesDate', nowDate)
|
|
|
+ this.$set(this.form, 'orderStatus', '录入')
|
|
|
+ this.$set(this.form, 'caseOverPayment', 0)
|
|
|
+ this.$set(this.form, 'overPayment', 0)
|
|
|
+ this.$set(this.form, 'orderAmount', 0)
|
|
|
+ this.$set(this.form, 'predictOceanFreight', 0)
|
|
|
+ this.$set(this.form, 'presenterIntegral' , 0)
|
|
|
+ this.$set(this.form, 'convertIntegral' , 0)
|
|
|
+ this.$set(this.form, 'profit' , 0)
|
|
|
+ this.$set(this.form, 'paymentType', '预付')
|
|
|
+ this.$set(this.form, 'thisUsedProfit' , 0)
|
|
|
+ this.$set(this.form, 'createProfit' , 0)
|
|
|
+ this.$set(this.form, 'isFreight' , 0)
|
|
|
+ this.$set(this.form, 'isLabel' , 0)
|
|
|
+ },
|
|
|
// 复制新单
|
|
|
copyOrder() {
|
|
|
this.queryData(this.form.id, true)
|
|
@@ -1682,7 +1747,7 @@ export default {
|
|
|
},
|
|
|
// 销售金额获取
|
|
|
getMarketPrice(row) {
|
|
|
- getMarketPrice({code: row.code}).then(res => {
|
|
|
+ getMarketPrice({code: row.code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
|
|
|
this.salesPriceOtion = res.data.data
|
|
|
})
|
|
|
},
|
|
@@ -1810,7 +1875,7 @@ export default {
|
|
|
this.openFullScreen(true)
|
|
|
let goodsData = []
|
|
|
res.data.forEach(item => {
|
|
|
- getMarketPrice({code: item.code}).then(response => {
|
|
|
+ getMarketPrice({code: item.code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(response => {
|
|
|
if (response.data.data.length > 0) {
|
|
|
this.$set(item, 'price', response.data.data[0].salesPrice)
|
|
|
} else {
|
|
@@ -1974,7 +2039,8 @@ export default {
|
|
|
accDate: this.form.businesDate,
|
|
|
srcType: 1,
|
|
|
tradeType: 'GN',
|
|
|
- optionType: 'GN'
|
|
|
+ optionType: 'GN',
|
|
|
+ chargeMember: this.form.chargeMember,
|
|
|
}
|
|
|
if(bool){ //申请货款
|
|
|
this.billData.srcId = -1
|
|
@@ -2020,6 +2086,14 @@ export default {
|
|
|
this.removeGoodsRepeat()
|
|
|
},
|
|
|
async getCorpRow(data) {
|
|
|
+ if (data.adminProfiles) {
|
|
|
+ data.adminProfiles = data.adminProfiles.split(",");
|
|
|
+ let arr=[]
|
|
|
+ data.adminProfiles.forEach(e => {
|
|
|
+ arr.push(this.userList.find(item => item.id == e).realName)
|
|
|
+ })
|
|
|
+ this.$set(this.form, 'chargeMember', arr[0])
|
|
|
+ }
|
|
|
getCorpDetail({corpId:data.id}).then(res => {
|
|
|
this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: 0
|
|
|
})
|
|
@@ -2140,7 +2214,7 @@ export default {
|
|
|
},
|
|
|
goodsListSaveHandle() {
|
|
|
for (let item in this.goodsListSave) {
|
|
|
- getMarketPrice({code: this.goodsListSave[item].code}).then(res => {
|
|
|
+ getMarketPrice({code: this.goodsListSave[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
this.$set(this.goodsListSave[item], 'price', res.data.data[0].salesPrice)
|
|
|
} else {
|
|
@@ -2204,7 +2278,7 @@ export default {
|
|
|
},
|
|
|
tableDataHandle() {
|
|
|
for (let item=0;item<this.tableData.length;item++) {
|
|
|
- getMarketPrice({code: this.tableData[item].code}).then(res => {
|
|
|
+ getMarketPrice({code: this.tableData[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
this.$set(this.tableData[item], 'price', res.data.data[0].salesPrice)
|
|
|
} else {
|
|
@@ -2354,7 +2428,7 @@ export default {
|
|
|
for (let item in list) {
|
|
|
if (this.policyData.length > 0) {
|
|
|
if (!list[item].specialOffer) {
|
|
|
- getMarketPrice({code: list[item].code}).then(response => {
|
|
|
+ getMarketPrice({code: list[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(response => {
|
|
|
if (response.data.data.length > 0) {
|
|
|
this.$set(list[item], 'price', response.data.data[0].salesPrice)
|
|
|
} else {
|
|
@@ -2366,7 +2440,7 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
if (!list[item].salesPrice) {
|
|
|
- getMarketPrice({code: list[item].code}).then(response => {
|
|
|
+ getMarketPrice({code: list[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(response => {
|
|
|
if (response.data.data.length > 0) {
|
|
|
this.$set(list[item], 'price', response.data.data[0].salesPrice)
|
|
|
} else {
|
|
@@ -3210,17 +3284,7 @@ export default {
|
|
|
::v-deep .el-form-item__content{
|
|
|
line-height: 32px;
|
|
|
}
|
|
|
-///deep/ .avue-tree {
|
|
|
-// display: flex;
|
|
|
-// flex-direction: column;
|
|
|
-// overflow-y: hidden;
|
|
|
-// height: 100%;
|
|
|
-//}
|
|
|
-///deep/ .avue-tree__filter {
|
|
|
-// flex-shrink: 1;
|
|
|
-//}
|
|
|
-///deep/ .avue-tree__content {
|
|
|
-// height: calc(100% - 32px);
|
|
|
-// overflow-y: auto;
|
|
|
-//}
|
|
|
+.isShow {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
</style>
|