|
@@ -14,7 +14,7 @@
|
|
|
@click="editCustomer">保 存
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
|
|
|
- v-if="form.generateTask !== '已生成'" :disabled="isDisabledTask" @click="generateOutbound">
|
|
|
+ :disabled="isDisabledTask" @click="generateOutbound">
|
|
|
{{ buttonText }}
|
|
|
</el-button>
|
|
|
|
|
@@ -50,7 +50,7 @@
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
<template slot-scope="{row,index}" slot="contacts">
|
|
|
<el-select v-model="form.contacts" placeholder="请选择" size="small" style="width:60%" filterable
|
|
|
- @change="contactsChange($event)">
|
|
|
+ @change="contactsChange($event)" :disabled = isContacts>
|
|
|
<el-option v-for="item in contactsOption" :key="item.id" :label="item.contacts"
|
|
|
:value="item.contacts" />
|
|
|
</el-select>
|
|
@@ -67,7 +67,7 @@
|
|
|
<el-button type="primary" icon="el-icon-printer" size="small"
|
|
|
@click="handlePrint">打印</el-button>
|
|
|
</template>
|
|
|
- <template slot="goodsId" slot-scope="{ row, index }">
|
|
|
+ <!-- <template slot="goodsId" slot-scope="{ row, index }">
|
|
|
<span style="display:flex">
|
|
|
<el-select v-model="row.goodsId" placeholder="请选择" size="small" filterable
|
|
|
style="width:60%" >
|
|
@@ -77,7 +77,7 @@
|
|
|
</el-select>
|
|
|
<el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
|
|
|
</span>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
<el-button :size="size" :disabled="disabled" :type="type"
|
|
|
:icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="editBtn(row, index)">编辑
|
|
@@ -147,6 +147,7 @@ import checkSchedule from "@/components/check/checkSchedule";
|
|
|
import check from "@/components/check/check";
|
|
|
import { getList } from "@/api/paymentManagement/paymentRecord"
|
|
|
import TicketDistribution from "../../../oceanShipping/maritimeExport/components/ticketDistribution.vue";
|
|
|
+import M from "minimatch";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
@@ -155,8 +156,9 @@ export default {
|
|
|
dataList: [],
|
|
|
dicUrlWithCustomId: '',
|
|
|
isDisabled: false,
|
|
|
- isDisabledTask: true,
|
|
|
+ isDisabledTask: false,
|
|
|
contactsOption: [],
|
|
|
+ isContacts:false,
|
|
|
checkData: {},
|
|
|
buttonText: '生成任务',
|
|
|
buttonColor: 'success', // 初始颜色为success
|
|
@@ -196,7 +198,6 @@ export default {
|
|
|
console.log('this.onLoad.id', this.onLoad.id);
|
|
|
|
|
|
if (!this.form.id) {
|
|
|
- console.log(3);
|
|
|
this.$set(this.optionContactsBack, "addBtn", true)
|
|
|
// this['optionContacts'] = this['optionContactsBack'];
|
|
|
// this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
|
|
@@ -406,22 +407,22 @@ export default {
|
|
|
// decimals: 2
|
|
|
// }],
|
|
|
column: [{
|
|
|
- label: '商品名称',
|
|
|
+ label: '轮胎名称',
|
|
|
prop: 'goodsId',
|
|
|
width: 200,
|
|
|
disabled: false,
|
|
|
remote: true,
|
|
|
overHidden: true,
|
|
|
type: 'select',
|
|
|
- // props: {
|
|
|
- // label: 'cname',
|
|
|
- // value: 'id'
|
|
|
- // },
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
// dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
|
|
|
- // dicUrl: /api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}
|
|
|
+ dicUrl: []
|
|
|
// dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
|
|
|
}, {
|
|
|
- label: '商品编码',
|
|
|
+ label: '轮胎编码',
|
|
|
prop: 'goodsNo',
|
|
|
overHidden: true,
|
|
|
disabled: false,
|
|
@@ -451,7 +452,7 @@ export default {
|
|
|
disabled: false,
|
|
|
width: 100
|
|
|
}, {
|
|
|
- label: '商品描述',
|
|
|
+ label: '轮胎描述',
|
|
|
prop: 'goodsDescription',
|
|
|
disabled: false,
|
|
|
overHidden: true,
|
|
@@ -642,15 +643,15 @@ export default {
|
|
|
},
|
|
|
async created() {
|
|
|
this.findObject(this.optionContactsBack.column, "goodsId").change = ({ value, column }) => {
|
|
|
-
|
|
|
if (this.formContacts.goodsId !== value) {
|
|
|
- goodsDetail({ id: value }).then(res => {
|
|
|
+ goodsDetail({ id: value,customId:this.dicUrlWithCustomId }).then(res => {
|
|
|
this.formContacts.goodsNo = res.data.data.code
|
|
|
this.formContacts.brandId = res.data.data.brandId
|
|
|
this.formContacts.propertyName = res.data.data.specificationAndModel
|
|
|
this.formContacts.pattern = res.data.data.brandItem
|
|
|
this.formContacts.goodsDescription = res.data.data.goodsDescription
|
|
|
this.formContacts.units = res.data.data.unit
|
|
|
+ this.formContacts.price = res.data.data.price
|
|
|
if (res.data.data.whether == 0) {
|
|
|
this.findObject(this.optionContactsBack.column, "dot").disabled = true
|
|
|
} else {
|
|
@@ -695,11 +696,10 @@ export default {
|
|
|
this.optionOutboundRecords = await this.getColumnData(this.getColumnName(269.3), this.optionOutboundRecordsBack);
|
|
|
this.key++
|
|
|
if (this.onLoad.id && this.detailData.id) {
|
|
|
- console.log(1);
|
|
|
this.$set(this.optionForm, 'disabled', true)
|
|
|
this.$set(this.optionContactsBack, 'disabled', true)
|
|
|
+ this.isContacts = true
|
|
|
this.isDisabled = true
|
|
|
-
|
|
|
this.refresh(this.onLoad.id, true)
|
|
|
} else if (this.onLoad.id) {
|
|
|
console.log(2);
|
|
@@ -715,23 +715,55 @@ export default {
|
|
|
this.form.businessSource = '内部销售'
|
|
|
}
|
|
|
console.log('this.detailData.status', this.detailData.status);
|
|
|
- if (this.detailData.status == 1) {
|
|
|
- this.isExamineBtn = false;
|
|
|
- }
|
|
|
- goodsListXs(this.dicUrlWithCustomId).then(res=>{
|
|
|
- console.log(res);
|
|
|
- this.goodsIdoptions = res.data
|
|
|
- })
|
|
|
+ // if (this.detailData.status == 1) {
|
|
|
+ // this.isExamineBtn = false;
|
|
|
+ // }
|
|
|
+ // goodsListXs(this.dicUrlWithCustomId).then(res=>{
|
|
|
+ // console.log(res);
|
|
|
+ // this.goodsIdoptions = res.data
|
|
|
+ // })
|
|
|
},
|
|
|
watch:{
|
|
|
dicUrlWithCustomId(){
|
|
|
- console.log(23432);
|
|
|
- goodsListXs(this.dicUrlWithCustomId).then(res=>{
|
|
|
- console.log(res);
|
|
|
- this.goodsIdoptions = res.data
|
|
|
- })
|
|
|
- // this.findObject(this.optionContactsBack.column, "goodsId").dicUrl = `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}`
|
|
|
+ // console.log(23432);
|
|
|
+ // goodsListXs(this.dicUrlWithCustomId).then(res=>{
|
|
|
+ // console.log(res);
|
|
|
+ // this.goodsIdoptions = res.data
|
|
|
+ // })
|
|
|
+ this.findObject(this.optionContactsBack.column, "goodsId").dicUrl = `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}`
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ $route(to, from) {
|
|
|
+ if (this.onLoad.id && this.detailData.id) {
|
|
|
+ this.$set(this.optionForm, 'disabled', true)
|
|
|
+ this.$set(this.optionContactsBack, 'disabled', true)
|
|
|
+ this.isContacts = true
|
|
|
+ this.isDisabled = true
|
|
|
+ this.refresh(this.onLoad.id, true)
|
|
|
+ } else if (this.onLoad.id) {
|
|
|
+ console.log(2);
|
|
|
+ this.refresh(this.onLoad.id, true)
|
|
|
}
|
|
|
+ if (!this.form.id) {
|
|
|
+ console.log(3);
|
|
|
+ this.$set(this.optionContactsBack, "addBtn", false)
|
|
|
+ this['optionContacts'] = this['optionContactsBack'];
|
|
|
+ this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
|
|
|
+ }
|
|
|
+ if (!this.detailData.id) {
|
|
|
+ this.form.businessSource = '内部销售'
|
|
|
+ }
|
|
|
+ console.log('this.detailData.status', this.detailData.status);
|
|
|
+ // if (this.detailData.status == 1) {
|
|
|
+ // this.isExamineBtn = false;
|
|
|
+ // }
|
|
|
+ if(to.name == '销售订单'){
|
|
|
+ console.log('销售订单');
|
|
|
+ this.isExamineBtn = false;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
editBtn(row, index) {
|
|
@@ -807,7 +839,7 @@ export default {
|
|
|
this.$set(item, 'disabled', false)
|
|
|
})
|
|
|
this.optionContactsBack.column.forEach(item => {
|
|
|
- if (item.label === '规格型号' || item.label === '花纹' || item.label === '品牌' || item.label === '物料编码' || item.label === '单位' || item.label === '商品描述') {
|
|
|
+ if (item.label === '规格型号' || item.label === '花纹' || item.label === '品牌' || item.label === '物料编码' || item.label === '单位' || item.label === '轮胎描述') {
|
|
|
item.disabled = true;
|
|
|
}
|
|
|
})
|
|
@@ -819,7 +851,10 @@ export default {
|
|
|
// this.$set(this.form.orderItemsList,'goodsNum',66)
|
|
|
},
|
|
|
generateOutbound() {
|
|
|
- if (this.buttonText === '生成任务') {
|
|
|
+ if(!this.form.id){
|
|
|
+ this.$message.error('请先保存')
|
|
|
+ }else{
|
|
|
+ if (this.buttonText === '生成任务') {
|
|
|
// 将按钮文本更改为"撤销任务"
|
|
|
this.buttonText = '撤销任务';
|
|
|
// 将按钮颜色更改为对应的颜色
|
|
@@ -872,6 +907,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
},
|
|
|
//联系人change
|
|
|
contactsChange(e) {
|
|
@@ -932,20 +968,25 @@ export default {
|
|
|
this.isApplySettlement = false;
|
|
|
}
|
|
|
|
|
|
- if (this.form.status == '退款中' || this.form.status == '已取消') {
|
|
|
- console.log(2);
|
|
|
+ if (this.form.status == '退款中') {
|
|
|
this.isConfirmRefundBtn = false;
|
|
|
}
|
|
|
-
|
|
|
- if (this.form.status == '退款请核') {
|
|
|
- console.log(3);
|
|
|
- this.isExamineBtn = false;
|
|
|
+ if(this.form.status == '已取消'){
|
|
|
+ this.isConfirmRefundBtn = true;
|
|
|
}
|
|
|
|
|
|
- console.log(this.form.status == '退款请核' || this.form.status == '退款中');
|
|
|
+ // if (this.form.status == '退款请核') {
|
|
|
+
|
|
|
+ // this.isExamineBtn = false;
|
|
|
+ // }
|
|
|
+ if(this.form.generateTask == '已生成'){
|
|
|
+ this.buttonText = '撤销任务';
|
|
|
+ this.isDisabledTask = false;
|
|
|
+ this.buttonColor= 'warning'
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
if (this.form.status == '退款请核' || this.form.status == '退款中') {
|
|
|
- console.log(4);
|
|
|
this.isRevocationRequest = false;
|
|
|
}
|
|
|
this.form.orderItemsList.forEach((items) => {
|