This commit is contained in:
2023-11-07 15:49:07 +08:00
parent 876f7d8f3c
commit 6e1bf994c2
19 changed files with 165 additions and 76 deletions

View File

@@ -154,11 +154,13 @@ export default {
padding: 8px 8px 8px 40px;
.title {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
}
.text {
height: 16px;
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
}

View File

@@ -39,7 +39,7 @@
</el-col>
<el-col :span='12'>
<el-form-item label="装车产品" prop="productId">
<el-select v-model="form.productId" placeholder="请选择" style="width: 100%;">
<el-select v-model="form.productId" disabled placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in productList"
:key="item.id"
@@ -79,6 +79,7 @@
<script>
import { getProductAll } from '@/api/base/product'
import { deliveryLogDetCreate } from '@/api/base/delivery'
import { orderDetail } from '@/api/base/orderManage'
export default {
name: 'LoadedPage',
data() {
@@ -107,16 +108,25 @@ export default {
}
},
methods: {
init(id, code) {
init(id, code, orderId) {
this.getSelectList()
this.form.logId = id
this.code = code
this.getProductId(orderId)
},
getSelectList() {
getProductAll().then(res => {
this.productList = res.data || []
})
},
// 获得装车产品
getProductId(orderId) {
orderDetail({
id: orderId
}).then(res => {
this.form.productId = res.data.planProductId || ''
})
},
submitForm() {
this.$refs['addOrUpdate'].validate((valid) => {
if (valid) {

View File

@@ -119,7 +119,8 @@ export default {
{
type: 'input',
label: '订单名',
param: 'orderName'
param: 'orderName',
defaultSelect: ''
},
{
type: 'input',
@@ -138,10 +139,10 @@ export default {
color: 'primary'
},
{
type: 'separate'
type: this.$auth.hasPermi('extend:delivery-log:create') ? 'separate' : '',
},
{
type: 'button',
type: this.$auth.hasPermi('extend:delivery-log:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
@@ -161,25 +162,25 @@ export default {
tableH: this.tableHeight(260),
total: 0,
tableBtn: [
this.$auth.hasPermi('base:group-team:update')
this.$auth.hasPermi('extend:delivery-log:loaded')
? {
type: 'loaded',
btnName: '装车'
}
: undefined,
this.$auth.hasPermi('base:group-team:update')
this.$auth.hasPermi('extend:delivery-log:detail')
? {
type: 'detail',
btnName: '详情'
}
: undefined,
this.$auth.hasPermi('base:group-team:update')
this.$auth.hasPermi('extend:delivery-log:update')
? {
type: 'edit',
btnName: '编辑'
}
: undefined,
this.$auth.hasPermi('base:group-team:delete')
this.$auth.hasPermi('extend:delivery-log:delete')
? {
type: 'delete',
btnName: '删除'
@@ -196,10 +197,32 @@ export default {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
if (location.href.indexOf('?') > 0) {
let arr = location.href.split('?')[1]
this.formConfig[0].defaultSelect = decodeURI(arr.split('=')[1])
} else {
this.formConfig[0].defaultSelect = ''
}
this.queryParams.orderName = this.formConfig[0].defaultSelect
this.getList();
},
components: { AddOrUpdate, LoadedPage, DeliveryLogDetail },
watch: {
$route: 'initData'
},
methods: {
initData(to) {
if (to.name === 'DeliveryLog') {
if (location.href.indexOf('?') > 0) {
let arr = location.href.split('?')[1]
this.formConfig[0].defaultSelect = decodeURI(arr.split('=')[1])
} else {
this.formConfig[0].defaultSelect = ''
}
this.queryParams.orderName = this.formConfig[0].defaultSelect
this.getList()
}
},
getList() {
deliveryLogPage({...this.queryParams}).then(res => {
this.list = res.data.list || []
@@ -236,7 +259,7 @@ export default {
case 'loaded':
this.centervisible2 = true
this.$nextTick(() => {
this.$refs.loadedPage.init(val.data.id, val.data.code)
this.$refs.loadedPage.init(val.data.id, val.data.code, val.data.orderId)
})
break
default:

View File

@@ -379,12 +379,14 @@ export default {
padding: 8px 8px 8px 40px;
.blodTip {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
margin-bottom: 8px;
}
.lightTip {
height: 16px;
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
}
@@ -415,11 +417,13 @@ export default {
padding: 8px 8px 8px 40px;
.title {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
}
.text {
height: 16px;
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
}

View File

@@ -61,7 +61,7 @@ const tableProps = [
},
{
prop: 'rate',
label: '累积发货比例%'
label: '累积发货比例(%)'
}
]
export default {
@@ -92,7 +92,7 @@ export default {
tableH: this.tableHeight(260),
total: 0,
tableBtn: [
this.$auth.hasPermi('base:group-team:update')
this.$auth.hasPermi('extend:delivery-log-det:detail')
? {
type: 'detail',
btnName: '详情'