Commit 567bf206 authored by Administrator's avatar Administrator

Merge branch 'pre-release' into 'jd_dev'

Pre Release最新代码合并入捷道研发分支20241119

See merge request !99
parents ca65a30e 2192026f
......@@ -214,6 +214,13 @@ export function deleteBillService(id) {
method: "delete",
});
}
// 检查提单状态是否已制作提单
export function checkBillOfLadingService(orderId) {
return request({
url: "/shipment/make-bill-of-lading/check/billOfLading/" + orderId,
method: "post",
});
}
// 获得制作提货单
export function getBillService(params) {
......
......@@ -60,13 +60,22 @@ export function exportCustomerFollowExcel(query) {
})
}
export function getCustomerFollowList(params) {
// 跟进分页列表
export function getCustomerFollowupList(params) {
return request({
url: "/customer/followup/page",
method: "get",
params
})
}
// 数据权限跟进分页列表
export function getDataSpaceCustomerFollowupList(params) {
return request({
url: "/customer/followup/data/space/page",
method: "get",
params
})
}
export function getCustomerFollowDetail(params) {
return request({
......@@ -99,7 +108,7 @@ export function updateCustomerFollowupStatus(data) {
})
}
export function exportCustomerFollow(params) {
export function exportCustomerFollowup(params) {
return request({
url: "/customer/followup/export-excel",
method: "get",
......@@ -107,6 +116,16 @@ export function exportCustomerFollow(params) {
})
}
// 数据权限导出跟进 Excel
export function exportDataSpaceCustomerFollowup(query) {
return request({
url: "/customer/followup/data/space/export-excel",
method: "get",
params: query,
responseType: "blob"
})
}
export function getFollowupNewNumber() {
return request({
url: "/customer/followup/getFollowupNewNumber",
......
This diff is collapsed.
......@@ -171,9 +171,9 @@
}
</style>
<script>
import { createCustomerFollow, getCustomerFollowPage, getCustomerFollowPage2, addCustomerFollow, getCustomerFollowList, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow"
import { addCustomerFollow, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow"
import { getCustomerContactsSelect } from "@/api/ecw/customerContacts"
import { getOfferPage, getOfferNumber } from "@/api/ecw/offer"
import {getOfferPage, getOfferNumber, getOffer} from "@/api/ecw/offer"
import { DICT_TYPE, getDictDataLabel } from "@/utils/dict"
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user"
......@@ -259,8 +259,25 @@ export default {
watch: {
"form.offerId"(v) {
if (v) {
getOfferNumber(v).then((r) => {
this.form.offerNumber = r.data
getOffer(v).then((r) => {
let offer = r.data
// 选择了报价单后,需要将报价单中的客户及客户联系人信息回显
this.form.offerNumber = offer.number
this.form.customerId = offer.relationId
this.form.contactId = offer.relation === 1 ? offer.consignorId : offer.consigneeId
getCustomerContactsListByCustomer({
customerId: this.form.customerId
}).then((res) => {
this.customerContactsList = res.data
this.customerContactsList.forEach((item) =>{
if (item.id === this.form.contactId){
this.form.customerNumber = item.customerNumber
this.form.contactName = item.name
this.form.contactPhone = "+" + item.areaCode + item.phoneNew
this.form.followUserId = item.customerService
}
})
})
})
} else {
this.form.offerNumber = ""
......@@ -406,7 +423,7 @@ export default {
this.$modal.msgError(this.$t("请选择跟进方式"))
return
}
if (!this.form.offerId && this.form.followType == 2) {
if (this.form.followType === 2 && !this.form.offerId) {
this.$modal.msgError(this.$t("请选择报价单"))
return
}
......@@ -414,6 +431,35 @@ export default {
if (status === 0) {
this.saveSubmitData(status)
} else {
// 提交结果时,除了附件和上级跟进单为非必填,其他都是必填
if (!this.form.customerId) {
this.$modal.msgError(this.$t("请选择客户"))
return
}
if (!this.form.contactId) {
this.$modal.msgError(this.$t("请选择客户联系人"))
return
}
if (!this.form.resultType) {
this.$modal.msgError(this.$t("请选择跟进结果"))
return
}
if (!this.form.purpose) {
this.$modal.msgError(this.$t("请填写跟进目的"))
return
}
if (!this.form.feedback) {
this.$modal.msgError(this.$t("请填写跟进情况"))
return
}
if (!this.form.nextTime) {
this.$modal.msgError(this.$t("请选择下次跟进时间"))
return
}
if (!this.form.nextPlan) {
this.$modal.msgError(this.$t("请填写下一步计划"))
return
}
this.$confirm(this.$t("提交后无法修改"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
......
......@@ -29,7 +29,7 @@
<script>
import {DICT_TYPE, getDictDatas, getDictDatas2} from "@/utils/dict";
import {getCustomerFollowList, updateCustomerFollowupStatus} from "@/api/ecw/customerFollow";
import {getCustomerFollowupList, updateCustomerFollowupStatus} from "@/api/ecw/customerFollow";
export default {
name: "customerFollowUpdateStatus",
......@@ -77,17 +77,7 @@ export default {
})
},
getCustomerFollowList() {
this.loading = true
getCustomerFollowList({
...this.followForm,
...this.formatQuery()
}).then((r) => {
this.customerFollowList = r.data.list
this.customerFollowTotal = r.data.total
this.loading = false
})
},
customerFollowUpdateStatusClose() {
this.status = null;
this.$emit('update:show', false)
......
......@@ -79,12 +79,12 @@
</template>
</el-input>
</el-form-item>
<el-form-item :label="$t('商品类别')" v-show="showSearch">
<el-form-item :label="$t('主营商品类别')" v-show="showSearch">
<el-select @change="handleSelectProductType" multiple v-model="queryParams.productTypes" :placeholder="$t('请选择')">
<el-option :label="item.titleZh" :value="item.id" v-for="item in productTypeList" :key="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('商品名称')" v-show="showSearch">
<el-form-item :label="$t('主营商品名称')" v-show="showSearch">
<el-select multiple filterable clearable v-model="queryParams.productIds" :placeholder="$t('请选择商品名称')">
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="item in productList" :key="item.id" />
</el-select>
......@@ -666,7 +666,7 @@
<el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div>
</el-dialog>
<customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list>
<customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" @refresh="handleQuery" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list>
<customer-follow ref="customerFollow" @refresh="handleQuery" @close="customerFollowVisible = false" v-if="customerFollowVisible" />
<customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints>
<transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
......
......@@ -377,7 +377,7 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('/offer/detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }} </el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/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('/offer/logList?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{ $t("跟进") }} </el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/logListCustomerCommon?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{ $t("跟进") }} </el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/offer/result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" 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>
......@@ -394,7 +394,7 @@
</el-card>
</el-tab-pane>
<el-tab-pane name="follow" :label="$t('跟进')">
<logListCommon ref="logListCommon" :customerService="customer.customerService" :customerNumber="customer.number" v-if="activeName === 'follow'" :customerId="id" />
<log-list-customer-common ref="logListCustomerCommon" :customerService="customer.customerService" :customerNumber="customer.number" v-if="activeName === 'follow'" :customerId="id" />
</el-tab-pane>
<el-tab-pane name="complain" :label="$t('客户投诉')">
<customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
......@@ -672,12 +672,12 @@
</div>
</el-dialog>
<customer-follow ref="customerFollow" v-if="customerFollowVisible" @close="customerFollowVisible = false" :customer-id="id" :customer-service="customer.customerService" :customer-number="customer.number" @refresh="logListCommonRefresh" />
<customer-follow ref="customerFollow" v-if="customerFollowVisible" @close="customerFollowVisible = false" :customer-id="id" :customer-service="customer.customerService" :customer-number="customer.number" @refresh="logListCustomerCommonRefresh" />
</div>
</template>
<script>
import { getCustomer, getCustomerSelect, getBrankByCustomer, levelLogPage, customerCreditLogPage, infoListOrderPage, orderStatistics, creditLogCreate, creditScoreStatistic, infoListReceiptPage, memberUserList, deleteCustomer, infoListStatisticsOrder } from "@/api/ecw/customer"
import { getCustomer, getBrankByCustomer, levelLogPage, customerCreditLogPage, infoListOrderPage, orderStatistics, creditLogCreate, creditScoreStatistic, infoListReceiptPage, memberUserList, deleteCustomer, infoListStatisticsOrder } from "@/api/ecw/customer"
import { getOfferPage as infoListOfferPage } from "@/api/ecw/offer"
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from "@/utils/dict"
import { getProductTypeList } from "@/api/ecw/productType"
......@@ -695,25 +695,23 @@ import { getCurrencyList } from "@/api/ecw/currency"
import customerLog from "@/views/ecw/customer/customerLog.vue"
import { checkPermi } from "@/utils/permission"
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue"
import { getListTree } from "@/api/ecw/region"
import { getWarehouseList } from "@/api/ecw/warehouse"
import { deleteOffer, cancel, recovery } from "@/api/ecw/offer"
import logListCommon from "@/views/ecw/offer/logListCommon"
import { getTradeCityList } from "@/api/ecw/region"
import UserSelector from "@/components/UserSelector"
import LogListCustomerCommon from "@/views/ecw/offer/logListCustomerCommon.vue";
export default {
name: "query",
components: {
LogListCustomerCommon,
UserSelector,
ImageDisplay,
Template,
CustomerFollow,
CustomerComplaint,
customerLog,
logListCommon
customerLog
},
created() {
// 获取币种
......@@ -1286,7 +1284,7 @@ export default {
this.getInfoListOfferPage()
} else if (this.activeName == "follow") {
this.followForm.pageNo = 1
this.getCustomerFollowList()
this.getCustomerFollowupList()
}
},
getWarehouseList() {
......@@ -1323,8 +1321,8 @@ export default {
this.handleQuery()
})
},
logListCommonRefresh() {
this.$refs.logListCommon && this.$refs.logListCommon.handleQuery()
logListCustomerCommonRefresh() {
this.$refs.logListCustomerCommon && this.$refs.logListCustomerCommon.handleQuery()
}
}
}
......
......@@ -372,7 +372,7 @@
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
<customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list>
<customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" @refresh="handleQuery" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list>
<customer-follow ref="customerFollow" @close="customerFollowVisible = false" @refresh="handleQuery" v-if="customerFollowVisible" />
<customer-complaints ref="customerComplaint" :customer-id.sync="customerId"></customer-complaints>
<transfer-customer :show.sync="show" :customer-ids.sync="selectCustomerList"></transfer-customer>
......
......@@ -62,11 +62,10 @@
</el-descriptions>
</div>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">{{ $t("运输") }}</div>
<div style="overflow: auto">
<el-descriptions :column="5" border class="card" v-if="list.consignorId" :labelStyle="{ width: '110px' }">
<el-descriptions :column="5" border class="card" :labelStyle="{ width: '110px' }">
<el-descriptions-item :label="$t('始发仓')">{{ $l(list.logisticsInfoDto, "startTitle") }}</el-descriptions-item>
<el-descriptions-item :label="$t('目的仓')"> {{ $l(list.logisticsInfoDto, "destCountryTitle") }} - {{ $l(list.logisticsInfoDto, "destCityTitle") }} - {{ $l(list.logisticsInfoDto, "destTitle") }} </el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
......
......@@ -1088,9 +1088,11 @@ export default {
},
activated() {
if (this.$route.query.id && this.form.offerId !== this.$route.query.id) {
// if (this.$route.query.id) {
this.getOffer()
}
if (this.$route.query.copyId && this.form.copyId !== this.$route.query.copyId) {
// if (this.$route.query.copyId) {
this.getOffer()
}
},
......@@ -1105,7 +1107,7 @@ export default {
getRegionList(4, 4).then((res) => (this.AddressCity = res.data))
competitorListAll().then((res) => (this.competitorList = res.data))
if (this.$route.query.id && this.$route.query.copyId) {
if (this.$route.query.id || this.$route.query.copyId) {
this.getOffer()
} else {
// alert(this.$route.query.customer.defaultContactPhone)
......@@ -1126,7 +1128,7 @@ export default {
}
}
} else {
this.form.relation = 1
// this.form.relation = 1
}
},
methods: {
......@@ -1148,10 +1150,11 @@ export default {
//加了是否从全部客户列表中报价按钮进来的判断
if (this.$route.query.type !== 1) {
getOffer(this.$route.query.id || this.$route.query.copyId).then((res) => {
console.log("报价单信息", res.data)
let formData = res.data
formData.serviceType = formData.serviceType ? formData.serviceType.split(",").filter((item) => item != "") : []
console.log(formData.serviceType)
console.log(formData)
formData.prodCreateReqVOList = []
if (formData.transportVO && formData.transportVO.packageType) {
formData.transportVO.packageTypeArr = formData.transportVO.packageType.split(",").filter((item) => item && item != "")
......@@ -1195,18 +1198,26 @@ export default {
formData.channelId = formData.channelId || null
this.$set(this, "form", formData)
console.log("报价单归属", this.form.relation == 1? "发货人":"收货人")
// 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect({
ids: [res.data.consigneeId, res.data.consignorId].join(",")
}).then(({ data }) => {
this.contactChooseType = "consignee"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consigneeId))
this.contactChooseType = "consignor"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consignorId))
this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consigneeId), "consignee")
this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consignorId), "consignor")
})
})
}
},
onContactAssignValueBackToDisplay(contact, contactChooseType) {
if (!contact) return
this.$set(this.form, contactChooseType + "Company", contact.company)
this.$set(this.form, contactChooseType + "Id", contact.customerContactsId)
this.$set(this.form, contactChooseType + "CountryCode", contact.areaCode)
this.$set(this.form, contactChooseType + "Email", contact.email)
this.$set(this.form, contactChooseType + "Name", contact.contactsName)
this.$set(this.form, contactChooseType + "Phone", contact.phoneNew)
},
onContactChoose(contact) {
if (!contact) return
......
......@@ -120,6 +120,16 @@
<a class="el-link el-link--primary is-underline" href="javascript:;" @click="$router.push(`/order/detail?orderId=${row.orderId}`)">{{ row.orderNo }}</a>
</template>
</el-table-column>
<el-table-column :label="$t('最新跟进时间')" width="120">
<template slot-scope="scope" v-if="scope.row.followupBackVO">
{{ parseTime(scope.row.followupBackVO.followTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('最新跟进记录')" width="120">
<template slot-scope="scope" v-if="scope.row.followupBackVO">
<a href="javascript:void(0)" @click="handleCustomerFollowLink(scope.row.followupBackVO)" class="link-type">{{ scope.row.followupBackVO.number }}</a>
</template>
</el-table-column>
<el-table-column :label="$t('联系人')" align="left" prop="relationName" width="120" />
<el-table-column :label="$t('联系电话')" align="left" prop="relationPhone" width="150" />
<el-table-column :label="$t('重要程序')" align="center" prop="importance" />
......@@ -554,7 +564,12 @@ export default {
this.loading = false
})
},
handleCustomerFollowLink(row) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleView(row)
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1
......
......@@ -41,12 +41,15 @@
</el-form-item>
</div>
<div class="search-time">
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="followFormTmp.createTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('下次跟进时间')">
<el-date-picker v-model="followFormTmp.nextTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item style="padding-left: 20px; width: auto">
<div class="flex-c-c">
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button>
<el-button type="primary" icon="el-icon-search" @click="getDataSpaceCustomerFollowupList">{{ $t("搜索") }} </el-button>
<el-button type="primary" @click="reset">{{ $t("重置") }} </el-button>
</div>
</el-form-item>
......@@ -121,7 +124,7 @@
</template>
</el-table-column>
</el-table>
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getCustomerFollowList" />
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getDataSpaceCustomerFollowupList" />
</el-card>
<customer-follow ref="customerFollow" @close="customerFollowVisible = false" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :customerService="customerService" :customerNumber="customerNumber" />
<customer-follow-update-status :show.sync="updateStatus" :followup-ids.sync="selectCustomerFollowList" @refresh="handleQuery"></customer-follow-update-status>
......@@ -129,7 +132,7 @@
</template>
<script>
import { getCustomerFollowList, exportCustomerFollow } from "@/api/ecw/customerFollow"
import { getCustomerFollowupList, getDataSpaceCustomerFollowupList, exportDataSpaceCustomerFollowup } from "@/api/ecw/customerFollow"
import { getDictDatas, DICT_TYPE, getDictDatas2 } from "@/utils/dict"
import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
import UserSelector from "@/components/UserSelector"
......@@ -155,6 +158,7 @@ export default {
pageSize: 10
},
followFormTmp: {
createTime: ["", ""],
nextTime: ["", ""]
}
}
......@@ -186,7 +190,7 @@ export default {
watch: {
selectCustomerFollowList(val) {
if (val.length === 0) {
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
this.$refs.multipleTable.clearSelection()
}
},
......@@ -233,6 +237,8 @@ export default {
let obj = {}
obj.customerId = this.customerId || null
obj.offerId = this.offerId || null
obj.beginCreateTime = this.followFormTmp.createTime[0]
obj.endCreateTime = this.followFormTmp.createTime[1]
obj.beginNextTime = this.followFormTmp.nextTime[0]
obj.endNextTime = this.followFormTmp.nextTime[1]
return obj
......@@ -243,13 +249,13 @@ export default {
this.followForm.pageNo = 1
this.customerFollowTotal = 0
this.customerFollowList = []
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
},
/** 跟进记录导出按钮操作 */
handleExport() {
// 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollow({
exportDataSpaceCustomerFollowup({
...this.followForm,
...this.formatQuery(),
pageNo: null,
......@@ -259,9 +265,9 @@ export default {
})
})
},
getCustomerFollowList() {
getDataSpaceCustomerFollowupList() {
this.loading = true
getCustomerFollowList({
getDataSpaceCustomerFollowupList({
...this.followForm,
...this.formatQuery()
}).then((r) => {
......@@ -271,12 +277,13 @@ export default {
})
},
reset() {
this.followFormTmp.createTime = ["", ""]
this.followFormTmp.nextTime = ["", ""]
this.followForm = {
pageNo: 1,
pageSize: 10
}
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
}
}
}
......
This diff is collapsed.
......@@ -14,7 +14,6 @@
</template>
<script>
import {parseTime} from '@/utils/ruoyi'
import {getLadingBill} from '@/api/ecw/order'
import lodop from '@/utils/lodop'
import PdfViewer from '@/components/PdfViewer'
import FileSaver from 'file-saver'
......
......@@ -63,10 +63,20 @@
</el-form-item>
</div>
</el-card>
<el-card class="form-section mt-10">
<!--el-card如果只有header没有主题会显示异常,所以没有收货人的时候单独用一个-->
<el-card class="form-section mt-10" v-if="!hasConsignee">
<div class="flex items-center">
<div class="card-title mr-20">收货人</div>
<el-radio-group v-if="noConsignee" v-model="hasConsignee">
<el-radio :label="true">{{ $t('有') }}</el-radio>
<el-radio :label="false">{{ $t('无') }}</el-radio>
</el-radio-group>
</div>
</el-card>
<el-card class="form-section mt-10" v-else>
<template #header>
<div class="flex items-center">
<div slot="header" class="card-title mr-20">收货人</div>
<div class="card-title mr-20">收货人</div>
<el-radio-group v-if="noConsignee" v-model="hasConsignee">
<el-radio :label="true">{{ $t('') }}</el-radio>
<el-radio :label="false">{{ $t('') }}</el-radio>
......@@ -754,7 +764,7 @@ import Selector from '@/components/Selector'
import CustomerContactSelector from '@/components/CustomerContactSelector'
import {getGuojiaAndShiAndWarehouseList, openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {checkCountryCode, getTradeCityList} from '@/api/ecw/region'
import {getDictData, getDictDatas} from '@/utils/dict'
import {DICT_TYPE, getDictData, getDictDatas} from '@/utils/dict'
import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit'
import AreaSelector from '@/components/AreaSelector'
......@@ -770,6 +780,7 @@ import {getCustomer} from "@/api/ecw/customer";
import {debounce} from "@/utils";
import {getOfferSelect, getOfferCheck} from "@/api/ecw/offer"
import Template from '@/views/cms/template/index.vue'
import {checkBillOfLadingService} from "@/api/ecw/box";
// 缓存默认的表单数据
let makeDefaultFormData = () => {
......@@ -818,6 +829,7 @@ export default {
callback();
}
return {
DICT_TYPE,
validatorPositiveNumber,
customDraweeList: [],
// draweeList: [],
......@@ -1347,11 +1359,11 @@ export default {
// 默认不允许控货无收货人
this.noConsignee = false
}
// 如果订单无收货人,但是最新的发货人允许无收货人则重置状态
if (this.noConsignee && !this.hasConsignee) {
// 最新的发货人允许无收货人,则重置为有收货人
this.hasConsignee = true
}
// // 如果订单无收货人,但是最新的发货人允许无收货人则重置状态
// if (this.noConsignee && !this.hasConsignee) {
// // 最新的发货人允许无收货人,则重置为有收货人
// this.hasConsignee = true
// }
})
},
async getOrder() {
......@@ -1414,7 +1426,7 @@ export default {
// 是否有收货人
this.hasConsignee = !!res.data.consigneeVO
// this.hasConsignee = !!res.data.consigneeVO
if (this.form.channelId == 0) {
delete this.form.channelId
......@@ -1515,9 +1527,9 @@ export default {
this.hasConsignee = false
}*/
// 如果发货人不允许无收货人,则重置为有收货人
if (!this.noConsignee && !this.hasConsignee) {
this.$set(this, 'hasConsignee', true)
}
// if (!this.noConsignee && !this.hasConsignee) {
// this.$set(this, 'hasConsignee', true)
// }
// 如果默认付款则设置为发货人付款
if (contact.defaultPay) {
this.$set(this.form, 'drawee', 1)
......@@ -1698,6 +1710,12 @@ export default {
}
});
}
},
checkBillOfLading(){
return checkBillOfLadingService(this.form.orderId).then((res) => {
console.log("检查提单制作状态" , res.data)
return res.data
})
},
/** 提交按钮 */
// type 在新建的时候表示状态,0草稿,2带入仓
......@@ -1778,7 +1796,7 @@ export default {
// 修改的提交
if (this.form.orderId) {
if (this.form.tidanNo) {
if (await this.checkBillOfLading()) {
await this.$confirm(this.$t('提单已制作,如需修改请联系客服'))
}
let data = Object.assign({}, this.form, {
......
......@@ -332,7 +332,7 @@
<el-dropdown-menu slot="dropdown">
<!--出货订单编辑,shipmentState > 0表示出货后,inWarehouseState == 0 表示预装未审核或者是卸柜到仓 , shipmentState==307 表示已预装,待封柜, shipmentState==407 表示已预装,待封柜)-->
<template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407"
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407"
>
<el-dropdown-item
@click.native="handleUpdate(scope.row)"
......@@ -348,7 +348,7 @@
scope.row.shipmentState == 314)) &&
!scope.row.abnormalState &&
exclude(scope.row.inWarehouseState, [204, 205, 206]) &&
exclude(scope.row.shipmentState, [307, 407])
exclude(scope.row.shipmentState, [305, 307, 407])
"
>
<el-dropdown-item
......@@ -474,12 +474,12 @@
<el-button type="text">{{ $t("仓库") }}</el-button>
<el-dropdown-menu slot="dropdown">
<!-- 入仓操作 -->
<template v-if="include(scope.row.status, [0, 2]) || scope.row.inWarehouseState == 208">
<template v-if="(include(scope.row.status, [0, 2]) || scope.row.inWarehouseState == 208)">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:warehouse_add']">{{ $t("入仓操作") }}</el-dropdown-item>
</template>
<!-- 入仓补充 -->
<template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0"
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407"
>
<el-dropdown-item
@click.native="$router.push('/order/warehousing-add?shipment=1&id=' + scope.row.orderId)"
......@@ -492,7 +492,7 @@
include(
scope.row.inWarehouseState,
[201, 202, 202, 210, 202, 211, 202, 214, 215, 216]
) && include(scope.row.status, [2, 3, 5, 10, 9, 8])
) && include(scope.row.status, [2, 3, 5, 10, 9, 8]) && include(scope.row.airShipment, [0, 1])
"
>
<el-dropdown-item
......@@ -507,7 +507,7 @@
</template>
<!-- 入仓修改 -->
<template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0"
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407"
>
<el-dropdown-item
@click.native="$router.push('/order/warehousing-update?shipment=1&id=' + scope.row.orderId)"
......@@ -525,7 +525,7 @@
]
) &&
scope.row.status != 11 &&
exclude(scope.row.shipmentState, [305, 307, 407])
exclude(scope.row.shipmentState, [305, 307, 407]) && include(scope.row.airShipment, [0, 1])
"
>
<el-dropdown-item
......@@ -611,7 +611,7 @@
>
</template>
<!--修改备货-->
<template v-if="include(scope.row.airShipment, [3, 4, 10]) && scope.row.abnormalState === 0 && scope.row.status <= 5">
<template v-if="include(scope.row.airShipment, [3, 4]) && scope.row.abnormalState === 0 && scope.row.status <= 5">
<el-dropdown-item
@click.native="
$router.push({
......
......@@ -232,7 +232,7 @@ export default {
isAllProduct: false, // 是否全部商品
isAllFilteredProduct: false, // 是否勾選全部搜索結果
specialProducts: [],
rules() {},
rules: {},
product: null,
currencyList: [],
unitList: [],
......
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