Commit 92e22fc5 by zhuzhequan

物流公司

parent 093705dc
...@@ -6440,7 +6440,6 @@ ...@@ -6440,7 +6440,6 @@
"version": "4.13.31", "version": "4.13.31",
"resolved": "https://registry.npmmirror.com/vxe-table/-/vxe-table-4.13.31.tgz", "resolved": "https://registry.npmmirror.com/vxe-table/-/vxe-table-4.13.31.tgz",
"integrity": "sha512-ibSM7jXYwJyY+eqXoRy/yXEVLENGFzL96cOEwtnFjBYbbaZV6/ptlM3tsyewGFBCUo5AtIyM+98hswxfjyXxMA==", "integrity": "sha512-ibSM7jXYwJyY+eqXoRy/yXEVLENGFzL96cOEwtnFjBYbbaZV6/ptlM3tsyewGFBCUo5AtIyM+98hswxfjyXxMA==",
"license": "MIT",
"dependencies": { "dependencies": {
"vxe-pc-ui": "^4.6.0" "vxe-pc-ui": "^4.6.0"
} }
...@@ -6515,12 +6514,6 @@ ...@@ -6515,12 +6514,6 @@
"integrity": "sha512-9yuCHLOU+og4OEkPWWtzrYk1Zt1hgN66U/NCJ0+vYJSx1MplBtoQRz8aEA+2RmCr3leLru98vQxNpw/vJsu/sg==", "integrity": "sha512-9yuCHLOU+og4OEkPWWtzrYk1Zt1hgN66U/NCJ0+vYJSx1MplBtoQRz8aEA+2RmCr3leLru98vQxNpw/vJsu/sg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/xe-utils": {
"version": "3.7.4",
"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.7.4.tgz",
"integrity": "sha512-9yuCHLOU+og4OEkPWWtzrYk1Zt1hgN66U/NCJ0+vYJSx1MplBtoQRz8aEA+2RmCr3leLru98vQxNpw/vJsu/sg==",
"license": "MIT"
},
"node_modules/xlsx": { "node_modules/xlsx": {
"version": "0.18.5", "version": "0.18.5",
"resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz", "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz",
......
import { BaseRespData } from '@/types/api' import { BasePaginationData, BaseRespData } from '@/types/api'
import axios from './axios' import axios from './axios'
import { import {
LogisticsMethod, LogisticsMethod,
...@@ -9,13 +9,70 @@ import { AddDeclarationRuleObj } from '@/views/logistics/types/declarationRule' ...@@ -9,13 +9,70 @@ import { AddDeclarationRuleObj } from '@/views/logistics/types/declarationRule'
import { LogisticsQuotation } from '@/views/logistics/types/logisticsQuotation' import { LogisticsQuotation } from '@/views/logistics/types/logisticsQuotation'
import { LogisticsPartitionObj } from '@/views/logistics/types/logisticsPartition' import { LogisticsPartitionObj } from '@/views/logistics/types/logisticsPartition'
import { ShippingAddressObj } from '@/views/logistics/types/shippingAddress' import { ShippingAddressObj } from '@/views/logistics/types/shippingAddress'
export interface ILogisticsList{
code:string
basicsName:string
apiData:unknown
}
export interface IForm{
name:string
code:string
id?:number
contact:string
phone:string
siteUrl:string
address:string
apiData:{
[key: string]: unknown
}
}
interface Ikey { interface Ikey {
[key: string]: unknown [key: string]: unknown
} }
export interface ILogisticsCompanyData {
pageSize: number
currentPage: number
total?: number
name?: string
code?: string
}
export interface ILogisticsCompany {
id: number; // bigint(20)
name: string | null; // varchar(255)
code: string; // varchar(30)
contact: string | null; // varchar(255)
phone: string | null; // varchar(100)
apiJson: string | null; // varchar(600)
mobile: string | null; // varchar(60)
carrier: string | null; // varchar(6)
address: string | null; // varchar(255)
siteUrl: string | null; // varchar(255)
apiKey: string | null; // varchar(256)
apiToken: string | null; // varchar(256)
clientId: string | null; // varchar(256)
accessToken: string | null; // varchar(256)
accessTokenExpiresIn: number | null; // int(11)
refreshToken: string | null; // varchar(256)
refreshDate: string | null; // datetime
refreshTokenExpiresIn: number | null; // int(11)
authCode: string | null; // varchar(500)
redirectUri: string | null; // varchar(256)
createTime: string | null; // timestamp
vat: string | null; // varchar(60)
ioss: string | null; // varchar(60)
basicType: number; // int(11)
}
interface ILogisticsParams { interface ILogisticsParams {
logType: string logType: string
relaId: number | string relaId: number | string
} }
//获取日志 //获取日志
export function getLogisticsLog(params: ILogisticsParams) { export function getLogisticsLog(params: ILogisticsParams) {
return axios.get<never, BaseRespData<never>>('logisticsLog/getList', { return axios.get<never, BaseRespData<never>>('logisticsLog/getList', {
...@@ -30,14 +87,17 @@ export function getLogisticsLog(params: ILogisticsParams) { ...@@ -30,14 +87,17 @@ export function getLogisticsLog(params: ILogisticsParams) {
export function getLogisticsWayList(data: LogisticsMethodList) { export function getLogisticsWayList(data: LogisticsMethodList) {
return axios.post<never, BaseRespData<never>>('/logisticsWay/list_page', data) return axios.post<never, BaseRespData<never>>('/logisticsWay/list_page', data)
} }
//新增 //新增
export function addLogisticsWay(data: LogisticsMethod) { export function addLogisticsWay(data: LogisticsMethod) {
return axios.post<Ikey, BaseRespData<never>>('/logisticsWay/add', data) return axios.post<Ikey, BaseRespData<never>>('/logisticsWay/add', data)
} }
//修改 //修改
export function updateLogisticsWay(data: LogisticsMethod) { export function updateLogisticsWay(data: LogisticsMethod) {
return axios.post<Ikey, BaseRespData<never>>('/logisticsWay/update', data) return axios.post<Ikey, BaseRespData<never>>('/logisticsWay/update', data)
} }
//更新状态 //更新状态
export function updateStatusLogisticsWay(params: UpdateLogisticsMethodStatus) { export function updateStatusLogisticsWay(params: UpdateLogisticsMethodStatus) {
return axios.get<Ikey, BaseRespData<never>>( return axios.get<Ikey, BaseRespData<never>>(
...@@ -47,22 +107,26 @@ export function updateStatusLogisticsWay(params: UpdateLogisticsMethodStatus) { ...@@ -47,22 +107,26 @@ export function updateStatusLogisticsWay(params: UpdateLogisticsMethodStatus) {
}, },
) )
} }
// 删除 // 删除
export function deleteLogisticsWay(ids: string) { export function deleteLogisticsWay(ids: string) {
return axios.get<Ikey, BaseRespData<never>>('/logisticsWay/delete', { return axios.get<Ikey, BaseRespData<never>>('/logisticsWay/delete', {
params: { ids: ids }, params: { ids: ids },
}) })
} }
//获取申报规则列表 //获取申报规则列表
export function getRuleList() { export function getRuleList() {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
'/logisticsCustomsRule/getRuleList', '/logisticsCustomsRule/getRuleList',
) )
} }
//获取仓库列表 //获取仓库列表
export function getWarehouseList() { export function getWarehouseList() {
return axios.get<never, BaseRespData<never>>('/factoryWarehouseInfo/getAll') return axios.get<never, BaseRespData<never>>('/factoryWarehouseInfo/getAll')
} }
//获取平台列表 //获取平台列表
export function getPlatformList() { export function getPlatformList() {
return axios.get<never, BaseRespData<never>>('/logisticsWay/platform') return axios.get<never, BaseRespData<never>>('/logisticsWay/platform')
...@@ -80,6 +144,7 @@ export function getAddressByIdList(params: { ...@@ -80,6 +144,7 @@ export function getAddressByIdList(params: {
params, params,
}) })
} }
//根据id查询地址 //根据id查询地址
export function getAddressById(params: { id: number | string }) { export function getAddressById(params: { id: number | string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -89,6 +154,7 @@ export function getAddressById(params: { id: number | string }) { ...@@ -89,6 +154,7 @@ export function getAddressById(params: { id: number | string }) {
}, },
) )
} }
//新增 //新增
export function addAddress(params: ShippingAddressObj) { export function addAddress(params: ShippingAddressObj) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -96,6 +162,7 @@ export function addAddress(params: ShippingAddressObj) { ...@@ -96,6 +162,7 @@ export function addAddress(params: ShippingAddressObj) {
params, params,
) )
} }
//修改 //修改
export function updateAddress(params: ShippingAddressObj) { export function updateAddress(params: ShippingAddressObj) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -103,6 +170,7 @@ export function updateAddress(params: ShippingAddressObj) { ...@@ -103,6 +170,7 @@ export function updateAddress(params: ShippingAddressObj) {
params, params,
) )
} }
//删除 //删除
export function deleteAddressByIds(params: { ids: string }) { export function deleteAddressByIds(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -120,6 +188,7 @@ export function deleteAddressByIds(params: { ids: string }) { ...@@ -120,6 +188,7 @@ export function deleteAddressByIds(params: { ids: string }) {
export function getlogisticsWayAllList() { export function getlogisticsWayAllList() {
return axios.get<never, BaseRespData<never>>('/logisticsWay/all_list', {}) return axios.get<never, BaseRespData<never>>('/logisticsWay/all_list', {})
} }
//物流报价列表 //物流报价列表
export function getlogisticsQuotationList(params: { export function getlogisticsQuotationList(params: {
logisticsIdList?: number[] logisticsIdList?: number[]
...@@ -131,6 +200,7 @@ export function getlogisticsQuotationList(params: { ...@@ -131,6 +200,7 @@ export function getlogisticsQuotationList(params: {
params, params,
) )
} }
//新增 //新增
export function addLogisticsQuotation(params: LogisticsQuotation) { export function addLogisticsQuotation(params: LogisticsQuotation) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -138,6 +208,7 @@ export function addLogisticsQuotation(params: LogisticsQuotation) { ...@@ -138,6 +208,7 @@ export function addLogisticsQuotation(params: LogisticsQuotation) {
params, params,
) )
} }
//修改 //修改
export function updateLogisticsQuotation(params: LogisticsQuotation) { export function updateLogisticsQuotation(params: LogisticsQuotation) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -145,6 +216,7 @@ export function updateLogisticsQuotation(params: LogisticsQuotation) { ...@@ -145,6 +216,7 @@ export function updateLogisticsQuotation(params: LogisticsQuotation) {
params, params,
) )
} }
//删除 //删除
export function deleteLogisticsQuotation(params: { ids: string }) { export function deleteLogisticsQuotation(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -154,6 +226,7 @@ export function deleteLogisticsQuotation(params: { ids: string }) { ...@@ -154,6 +226,7 @@ export function deleteLogisticsQuotation(params: { ids: string }) {
}, },
) )
} }
//导入 //导入
export function importLogisticsQuotation(formData: FormData) { export function importLogisticsQuotation(formData: FormData) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -166,6 +239,7 @@ export function importLogisticsQuotation(formData: FormData) { ...@@ -166,6 +239,7 @@ export function importLogisticsQuotation(formData: FormData) {
}, },
) )
} }
//下载模版 //下载模版
export function downloadLogisticsQuotationTemplate() { export function downloadLogisticsQuotationTemplate() {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -175,6 +249,7 @@ export function downloadLogisticsQuotationTemplate() { ...@@ -175,6 +249,7 @@ export function downloadLogisticsQuotationTemplate() {
}, },
) )
} }
//根据ID查对象 //根据ID查对象
export function getLogisticsQuotationByID(params: { id: number | string }) { export function getLogisticsQuotationByID(params: { id: number | string }) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -197,6 +272,7 @@ export function getLogisticsCustomsRuleList(params: { ...@@ -197,6 +272,7 @@ export function getLogisticsCustomsRuleList(params: {
params, params,
) )
} }
//新增 //新增
export function addLogisticsCustomsRule(params: AddDeclarationRuleObj) { export function addLogisticsCustomsRule(params: AddDeclarationRuleObj) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -204,6 +280,7 @@ export function addLogisticsCustomsRule(params: AddDeclarationRuleObj) { ...@@ -204,6 +280,7 @@ export function addLogisticsCustomsRule(params: AddDeclarationRuleObj) {
params, params,
) )
} }
//修改 //修改
export function updateLogisticsCustomsRule(params: AddDeclarationRuleObj) { export function updateLogisticsCustomsRule(params: AddDeclarationRuleObj) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -211,6 +288,7 @@ export function updateLogisticsCustomsRule(params: AddDeclarationRuleObj) { ...@@ -211,6 +288,7 @@ export function updateLogisticsCustomsRule(params: AddDeclarationRuleObj) {
params, params,
) )
} }
//删除 //删除
export function deleteLogisticsCustomsRule(params: { ids: string }) { export function deleteLogisticsCustomsRule(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>('/logisticsCustomsRule/delete', { return axios.get<never, BaseRespData<never>>('/logisticsCustomsRule/delete', {
...@@ -231,6 +309,7 @@ export function getLogisticsZoneList(params: { ...@@ -231,6 +309,7 @@ export function getLogisticsZoneList(params: {
params, params,
) )
} }
//新增 //新增
export function addLogisticsZone(params: LogisticsPartitionObj) { export function addLogisticsZone(params: LogisticsPartitionObj) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -238,6 +317,7 @@ export function addLogisticsZone(params: LogisticsPartitionObj) { ...@@ -238,6 +317,7 @@ export function addLogisticsZone(params: LogisticsPartitionObj) {
params, params,
) )
} }
//修改 //修改
export function updateLogisticsZone(params: LogisticsPartitionObj) { export function updateLogisticsZone(params: LogisticsPartitionObj) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -245,6 +325,7 @@ export function updateLogisticsZone(params: LogisticsPartitionObj) { ...@@ -245,6 +325,7 @@ export function updateLogisticsZone(params: LogisticsPartitionObj) {
params, params,
) )
} }
//删除 //删除
export function deleteLogisticsZone(params: { export function deleteLogisticsZone(params: {
logisticsList: string[] logisticsList: string[]
...@@ -255,6 +336,7 @@ export function deleteLogisticsZone(params: { ...@@ -255,6 +336,7 @@ export function deleteLogisticsZone(params: {
params, params,
) )
} }
//物流分区导入 //物流分区导入
export function importLogisticsZone(formData: FormData) { export function importLogisticsZone(formData: FormData) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -267,6 +349,7 @@ export function importLogisticsZone(formData: FormData) { ...@@ -267,6 +349,7 @@ export function importLogisticsZone(formData: FormData) {
}, },
) )
} }
//物流分区导入模板 //物流分区导入模板
export function exportExcelLogisticsZone() { export function exportExcelLogisticsZone() {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -291,3 +374,34 @@ export function getLogisticsTrialCalculation(params: { ...@@ -291,3 +374,34 @@ export function getLogisticsTrialCalculation(params: {
}, },
) )
} }
export function logisticsCompany(data: ILogisticsCompanyData) {
return axios.get<never, BasePaginationData<ILogisticsCompany>>(
'logisticsCompany/list_page',
{ params:data },
)
}
export function logisticsCompanyAdd(data:IForm) {
return axios.post<never, BaseRespData<never>>(
'/logisticsCompany/add',
data
)
}
export function logisticsCompanyUpdate(data:IForm) {
return axios.post<never, BaseRespData<never>>(
'/logisticsCompany/update',
data
)
}
export function logisticsCompanyDelete(ids:string | number[]) {
return axios.get<never, BaseRespData<never>>(
'/logisticsCompany/delete',
{ params:{ids} },
)
}
export function logisticsCompanyAllCodelist() {
return axios.get<never, BaseRespData<ILogisticsList[]>>(
'/logisticsCompany/allCodelist',
)
}
...@@ -50,7 +50,7 @@ export function getCardOrderList( ...@@ -50,7 +50,7 @@ export function getCardOrderList(
}, },
) )
} }
export function confirmOrderApi(data: number[], productionClient: string,type:string,logisticsTrialCalculation?:LogisticsData) { export function confirmOrderApi(data: number[], productionClient: string,type:string,logisticsTrialCalculation?:LogisticsData | null) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/confirmOrders', 'factory/podJomallOrderUs/confirmOrders',
{ {
......
...@@ -126,6 +126,12 @@ const router = createRouter({ ...@@ -126,6 +126,12 @@ const router = createRouter({
title: '物流方式', title: '物流方式',
}, },
component: () => import('@/views/logistics/logisticsMethod.vue'), component: () => import('@/views/logistics/logisticsMethod.vue'),
},{
path: '/logistics/logisticsCompany',
meta: {
title: '物流公司',
},
component: () => import('@/views/logistics/logisticsCompany.vue'),
}, },
{ {
path: '/logistics/shippingAddress', path: '/logistics/shippingAddress',
...@@ -218,7 +224,7 @@ const router = createRouter({ ...@@ -218,7 +224,7 @@ const router = createRouter({
}, },
component: () => import('@/views/logistics/logisticsQuotation.vue'), component: () => import('@/views/logistics/logisticsQuotation.vue'),
}, },
{ {
path: '/logistics/declarationRule', path: '/logistics/declarationRule',
meta: { meta: {
......
...@@ -130,6 +130,10 @@ const menu: MenuItem[] = [ ...@@ -130,6 +130,10 @@ const menu: MenuItem[] = [
label: '物流', label: '物流',
children: [ children: [
{ {
index: '/logistics/logisticsCompany',
id: 6,
label: '物流公司',
},{
index: '/logistics/logisticsMethod', index: '/logistics/logisticsMethod',
id: 1, id: 1,
label: '物流方式', label: '物流方式',
......
...@@ -79,6 +79,7 @@ export interface ProductList { ...@@ -79,6 +79,7 @@ export interface ProductList {
passNum?: number passNum?: number
notPassNum?: number notPassNum?: number
payAmount?: number payAmount?: number
status?: number
weight?: number | null weight?: number | null
diyId?: string diyId?: string
endProductId?: string endProductId?: string
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
<div class="user-page flex-column card h-100 overflow-hidden"> <div class="user-page flex-column card h-100 overflow-hidden">
<div class="header-filter-form"> <div class="header-filter-form">
<SearchForm <SearchForm
v-model="searchForm"
:config="searchConfig" :config="searchConfig"
@search="search" @search="search"
@add="addDialog" @add="addDialog"
@delete="deleteFn" @delete="deleteFn"
v-model="searchForm"
></SearchForm> ></SearchForm>
</div> </div>
<div class="user-content flex-1 flex-column overflow-hidden"> <div class="user-content flex-1 flex-column overflow-hidden">
<div class="user-list flex-1 overflow-hidden" v-loading="loading"> <div v-loading="loading" class="user-list flex-1 overflow-hidden">
<CustomizeTable <CustomizeTable
v-model="tableData" v-model="tableData"
:config="tableConfig" :config="tableConfig"
@getCheckboxRecords="handleCheckboxRecords" @get-checkbox-records="handleCheckboxRecords"
></CustomizeTable> ></CustomizeTable>
</div> </div>
<ElPagination <ElPagination
...@@ -32,16 +32,16 @@ ...@@ -32,16 +32,16 @@
</div> </div>
<LogDialog <LogDialog
:title="editForm.id ? '编辑物流方式' : '新增物流方式'"
dialogWidth="1000px"
v-model="dialogVisible" v-model="dialogVisible"
:title="editForm.id ? '编辑物流方式' : '新增物流方式'"
dialog-width="1000px"
@close="cancelFn" @close="cancelFn"
> >
<CustomizeForm <CustomizeForm
ref="editFormRef" ref="editFormRef"
v-model="editForm" v-model="editForm"
:config="formConfig" :config="formConfig"
formItemWidth="100%" form-item-width="100%"
> >
</CustomizeForm> </CustomizeForm>
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
</template> </template>
</LogDialog> </LogDialog>
<LogDialog <LogDialog
title="操作日志"
v-model="logDialogVisible" v-model="logDialogVisible"
title="操作日志"
@close="logDialogVisible = false" @close="logDialogVisible = false"
> >
<div v-for="item in logList" :key="item.id" style="margin-bottom: 8px"> <div v-for="item in logList" :key="item.id" style="margin-bottom: 8px">
......
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
</div> </div>
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label" <span class="goods-item-info-item-label"
>第三方生产单号:</span >第三方生产单号:</span
> >
<span <span
class="goods-item-info-item-value" class="goods-item-info-item-value"
...@@ -342,19 +342,19 @@ ...@@ -342,19 +342,19 @@
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label">{{ <span class="goods-item-info-item-label">{{
status === 'TO_BE_CONFIRMED' status === 'TO_BE_CONFIRMED'
? '未生产数量:' ? '未生产数量:'
: status === 'EXCEPTION_ORDER' : status === 'EXCEPTION_ORDER'
? '数量:' ? '数量:'
: '已生产数量:' : '已生产数量:'
}}</span> }}</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ {{
status === 'TO_BE_CONFIRMED' status === 'TO_BE_CONFIRMED'
? item.notPassNum ? item.notPassNum
: status === 'EXCEPTION_ORDER' : status === 'EXCEPTION_ORDER'
? item.num ? item.num
: item.passNum : item.passNum
}} }}
</span> </span>
</div> </div>
...@@ -633,7 +633,7 @@ ...@@ -633,7 +633,7 @@
<div class="grid-container"> <div class="grid-container">
<div class="grid-item" title="商品名称"> <div class="grid-item" title="商品名称">
<span class="grid-item-value" <span class="grid-item-value"
>{{ cardItem?.productName }} >{{ cardItem?.productName }}
</span> </span>
</div> </div>
<div class="grid-item" title="未生产数量"> <div class="grid-item" title="未生产数量">
...@@ -715,6 +715,7 @@ ...@@ -715,6 +715,7 @@
v-model="productionClientValue" v-model="productionClientValue"
clearable clearable
placeholder="请选择生产端" placeholder="请选择生产端"
@change="handleProductionClientChange"
> >
<ElOption <ElOption
v-for="(item, index) in productionClient" v-for="(item, index) in productionClient"
...@@ -725,18 +726,15 @@ ...@@ -725,18 +726,15 @@
</ElSelect> </ElSelect>
</div> </div>
<el-table <el-table
@selection-change="selectionChange" v-if="productionClientValue==='JOMALL'"
height="400px" height="400px"
class="production-client-table"
:data="confirmData" :data="confirmData"
border border
highlight-current-row
@current-change="currentChange"
> >
<el-table-column <el-table-column
label=""
width="60"
align="center"
type="selection"
></el-table-column>
<el-table-column
label="序号" label="序号"
width="60" width="60"
align="center" align="center"
...@@ -788,7 +786,7 @@ ...@@ -788,7 +786,7 @@
<LogList :log-list="logList" /> <LogList :log-list="logList" />
</el-dialog> </el-dialog>
<FastProduction <FastProduction
v-model:detailVisible="detailVisible" v-model:detail-visible="detailVisible"
:current-status="status" :current-status="status"
:detail-data="detailData" :detail-data="detailData"
:fast-key="fastKey" :fast-key="fastKey"
...@@ -867,8 +865,7 @@ import { ...@@ -867,8 +865,7 @@ import {
toBeConfirmedApi, toBeConfirmedApi,
loadWarehouseListApi, loadWarehouseListApi,
getLogisticsCalculation, getLogisticsCalculation,
LogisticsData, refreshMaterialApi, LogisticsData,
refreshMaterialApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import { import {
...@@ -897,7 +894,7 @@ import dayjs from 'dayjs' ...@@ -897,7 +894,7 @@ import dayjs from 'dayjs'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
new (type: string): XMLHttpRequest new(type: string): XMLHttpRequest
} }
VBS_BinaryToArray: { VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] } (data: unknown): { toArray(): number[] }
...@@ -1142,40 +1139,53 @@ const { ...@@ -1142,40 +1139,53 @@ const {
} }
}, },
}) })
const currentChange = (row: LogisticsData) => {
if (row) {
confirmSelectionData.value = [row]
}
}
const handleProductionClientChange = async (v: string) => {
if (v !== 'RIIN') {
if (confirmRowData.value) {
const { data } = await getLogisticsCalculation(confirmRowData.value?.id)
confirmData.value = data
}
}
}
const confirm = async (row: ProductList) => { const confirm = async (row: ProductList) => {
confirmDialogShow.value = true confirmDialogShow.value = true
productionClientValue.value = '' productionClientValue.value = ''
confirmRowData.value = row confirmRowData.value = row
confirmData.value = [] confirmData.value = []
confirmSelectionData.value = [] confirmSelectionData.value = []
const { data } = await getLogisticsCalculation(row.id)
confirmData.value = data
}
const selectionChange = (data: LogisticsData[]) => {
confirmSelectionData.value = data
} }
const handleConfirm = async () => { const handleConfirm = async () => {
if (!productionClientValue.value) { if (!productionClientValue.value) {
return ElMessage.warning('请选择生产端') return ElMessage.warning('请选择生产端')
} }
if (confirmSelectionData.value.length !== 1) { if (productionClientValue.value !== 'RIIN') {
return ElMessage.warning('请选择一条物流方式') if (confirmSelectionData.value.length !== 1) {
} return ElMessage.warning('请选择一条物流方式')
if (confirmSelectionData.value.some((el) => !el.status)) { }
return ElMessage.warning('请选择状态为成功的物流方式') if (confirmSelectionData.value.some((el) => !el.status)) {
return ElMessage.warning('请选择状态为成功的物流方式')
}
} }
const id = confirmRowData.value?.id const id = confirmRowData.value?.id
const res = await confirmOrderApi( const res = await confirmOrderApi(
[Number(id)], [Number(id)],
productionClientValue.value, productionClientValue.value,
'customize', 'customize',
confirmSelectionData.value[0], confirmSelectionData.value[0]||null,
) )
if (res.code !== 200) return if (res.code !== 200) return
ElMessage.success('操作成功') ElMessage.success('操作成功')
confirmDialogShow.value = false confirmDialogShow.value = false
search() search()
loadTabData() await loadTabData()
} }
const copy = (text: string) => { const copy = (text: string) => {
navigator.clipboard.writeText(text) navigator.clipboard.writeText(text)
...@@ -1925,4 +1935,18 @@ onMounted(() => { ...@@ -1925,4 +1935,18 @@ onMounted(() => {
.factory-sub-order-number { .factory-sub-order-number {
font-size: 12px; font-size: 12px;
} }
.production-client-table {
::v-deep(.current-row>td.el-table__cell) {
background-color: green;
color: white;
& > td.el-table__cell {
color: white !important;
background-color: green;
}
}
}
</style> </style>
...@@ -358,7 +358,6 @@ getWarehouse() ...@@ -358,7 +358,6 @@ getWarehouse()
::v-deep(.el-tabs) { ::v-deep(.el-tabs) {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column;
.el-tabs__content { .el-tabs__content {
flex: 1; flex: 1;
......
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