Commit b4bc2ba4 authored by honghy's avatar honghy Committed by wux

需求95 报价单页面和列表调整

parent 4e439883
<template>
<div class="app-container">
<el-card>
<div slot="header" class="card-title">{{ $t("报价单号") }}{{ list.number }} - <dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="list.status" /></div>
<div slot="header" class="card-title">{{ $t("报价单号") }}{{ list.number }} - <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.status" /></div>
<!-- 列表 -->
<div class="offer-header">
<span style="font-size: 15px"></span>
<div class="btns">
<el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="[4, 5, 6].indexOf(list.status) == -1" @click="$router.push('edit?id=' + offerId)">{{ $t("编辑") }}</el-button>
<el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[1, 3, 7].indexOf(list.status) > -1" size="mini" @click="handleAddOffer">{{ $t("跟进") }}</el-button>
<el-button v-hasPermi="['ecw:offer:result']" type="primary" v-if="[3, 7].indexOf(list.status) > -1" size="mini" @click="toResult">{{ $t("结果") }}</el-button>
<el-button v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']" size="mini" v-if="[1, 3, 7].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)">{{ $t("特价") }}</el-button>
<el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="[6, 8, 3].indexOf(list.status) == -1" @click="$router.push('edit?id=' + offerId)">{{ $t("编辑") }}</el-button>
<el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[2, 1, 5].indexOf(list.status) > -1" size="mini" @click="handleAddOffer">{{ $t("跟进") }}</el-button>
<el-button v-hasPermi="['ecw:offer:result']" type="primary" v-if="[1, 5].indexOf(list.status) > -1" size="mini" @click="toResult">{{ $t("结果") }}</el-button>
<el-button v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']" size="mini" v-if="[2, 1, 5].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)">{{ $t("特价") }}</el-button>
<el-button v-hasPermi="['ecw:offer:delete']" type="danger" size="mini" @click="handleDelete">{{ $t("删除") }}</el-button>
</div>
</div>
......
......@@ -5,8 +5,8 @@
<div slot="header" class="card-title">
{{ $route.path.indexOf("create") > -1 ? $t("新建报价单") : $t("编辑报价单") }}
</div>
<el-form-item :label="$t('销售阶段')" prop="saleStage">
<el-select v-model="form.saleStage" clearable :placeholder="$t('请选择')">
<el-form-item :label="$t('销售阶段')" prop="status">
<el-select v-model="form.status" clearable :placeholder="$t('请选择')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_SALE_STAGE)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
......@@ -623,12 +623,12 @@
<el-form-item label="" class="mt-20">
<!-- 非草稿状态显示为编辑按钮 -->
<el-button v-if="form.offerId && form.status != 2" type="primary" @click="submitForm(2)">{{ $t("编辑") }}</el-button>
<el-button v-if="form.offerId" type="primary" @click="submitForm()">{{ $t("编辑") }}</el-button>
<template v-else>
<el-button type="primary" @click="submitForm(2)">{{ $t("保存草稿") }}</el-button>
<!-- <el-button type="primary" @click="submitForm(2)">{{ $t("保存草稿") }}</el-button>-->
<!-- 草稿 -->
<el-button type="primary" @click="submitForm(3)">{{ $t("确认报价") }}</el-button>
<el-button type="primary" @click="submitForm(1)">{{ $t("确认报价") }}</el-button>
<!-- 需求确认 -->
</template>
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{ $t("取消") }}</el-button>
......@@ -674,7 +674,7 @@ const createDefaultForm = () => {
prodCreateReqVOList: [],
transportVO: {},
serviceType: [],
saleStage: 1
status: 1
}
}
export default {
......@@ -850,7 +850,7 @@ export default {
// stopTime: [{ required: true, message: this.$t("不能为空") }],
estimatedShippingTime: [{ required: true, message: this.$t("不能为空") }],
relation: [{ required: true, message: this.$t("请选择所属人") }],
saleStage: [{ required: true, message: this.$t("销售阶段不能为空") }],
status: [{ required: true, message: this.$t("销售阶段不能为空") }],
followUpSalesmanId: [{ required: true, message: this.$t("客户经理不能为空") }],
// control: [{ required: true, message: this.$t("请选择是否控货") }],
// importance: [
......@@ -1348,7 +1348,7 @@ export default {
formData.stopTime = ""
formData.estimatedShippingTime = ""
// 复制报价单状态重置为草稿
formData.status = 2
formData.status = 1
}
formData.channelId = formData.channelId || null
......@@ -1504,9 +1504,7 @@ export default {
prodUpdateReqVOList: this.getProductListWithDefaultValue(),
serviceType: this.form.serviceType.join(",")
})
if (data.status < 3) {
data.status = status
}
updateOffer(data).then((response) => {
this.$modal.msgSuccess(this.$t("修改成功"))
this.$redirect("index")
......
......@@ -172,7 +172,7 @@
</el-table-column>
<el-table-column :label="$t('销售阶段')" align="left" width="100">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.CUSTOMER_FOLLOWUP_SALE_STAGE" :value="row.saleStage" />
<dict-tag :type="DICT_TYPE.CUSTOMER_FOLLOWUP_SALE_STAGE" :value="row.status" />
</template>
</el-table-column>
<el-table-column :label="$t('总方数')" align="left" prop="volume" width="100" />
......@@ -299,19 +299,19 @@
6 完成 删除
7 跟进中 编辑、跟进、结果、特价、取消、 删除
-->
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }}</el-dropdown-item>
<el-dropdown>
<el-button icon="el-icon-plus" circle type="primary"></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('create?copyId=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("复制") }}</el-dropdown-item>
<el-dropdown-item @click.native="handleAddOffer(scope.row)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1">{{ $t("跟进") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}&saleStage=${scope.row.saleStage}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }}</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }}</el-dropdown-item>
<el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:recovery']">{{ $t("恢复") }}</el-dropdown-item>
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0, 1, 2, 3, 4, 5, 6, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{ $t("删除") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[2, 1, 5].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('create?copyId=' + scope.row.offerId)" v-if="[2, 1, 5].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("复制") }}</el-dropdown-item>
<el-dropdown-item @click.native="handleAddOffer(scope.row)" v-if="[2, 1, 5].indexOf(scope.row.status) > -1">{{ $t("跟进") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}&status=${scope.row.status}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[2, 1, 5].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }}</el-dropdown-item>
<!-- <el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[2, 1, 5].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }}</el-dropdown-item>-->
<!-- <el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[8].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:recovery']">{{ $t("恢复") }}</el-dropdown-item>-->
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0, 1, 2, 3, 4, 5, 6, 7,8].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{ $t("删除") }}</el-dropdown-item>
</el-dropdown-menu>
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }}</el-dropdown-item>
</el-dropdown>
</template>
</el-table-column>
......
......@@ -7,7 +7,7 @@
</el-form-item>
<el-form-item :label="$t('结果')" prop="result">
<dict-selector form-type="radio" :type="DICT_TYPE.ECW_OFFER_RESULT" v-model="form.result" :disabled="saleStage==6?true:false"/>
<dict-selector form-type="radio" :type="DICT_TYPE.ECW_OFFER_RESULT" v-model="form.result" :disabled="status==6?true:false"/>
</el-form-item>
<template v-if="form.result==1">
......@@ -84,7 +84,7 @@ export default {
},
selectLoading: false,
orderNoList: [],
saleStage: 0
status: 8
};
},
computed: {
......@@ -100,8 +100,8 @@ export default {
if(this.$route.query.offerId){
this.form.offerId = this.$route.query.offerId
}
if(this.$route.query.saleStage) {
this.saleStage = this.$route.query.saleStage
if(this.$route.query.status) {
this.status = this.$route.query.status
}
},
methods: {
......
......@@ -16,7 +16,7 @@
<el-descriptions-item :label="$t('创建时间')">{{offer.createTime}}</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="offer.status" />
<dict-tag :type="DICT_TYPE.CUSTOMER_FOLLOWUP_SALE_STAGE" :value="offer.status" />
</el-descriptions-item>
</el-descriptions>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment