imeik-bizui 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bizui/src/FieldAgreementUpload/index.vue +25 -0
- package/dist/bizui/src/FieldApplyTypeView/data.js +1 -1
- package/dist/bizui/src/FieldApplyTypeView/index.vue +12 -8
- package/dist/bizui/src/FieldBatchesDelivery/components/BatchDialog.vue +106 -0
- package/dist/bizui/src/FieldBatchesDelivery/components/MaterialList.vue +260 -0
- package/dist/bizui/src/FieldBatchesDelivery/components/OrderList.vue +59 -0
- package/dist/bizui/src/FieldBatchesDelivery/index.vue +62 -0
- package/dist/bizui/src/FieldCardHeader/index.vue +17 -10
- package/dist/bizui/src/FieldCompanySelect/index.vue +68 -0
- package/dist/bizui/src/FieldCustomSelect/components/CustomSelect.vue +42 -6
- package/dist/bizui/src/FieldMaterialSelect/components/AddressSelect.vue +87 -8
- package/dist/bizui/src/FieldMaterialSelect/components/ProductList.vue +20 -3
- package/dist/bizui/src/FieldMaterialSelect/index.vue +5 -2
- package/dist/bizui/src/FieldTagComponent/index.vue +9 -1
- package/dist/imeik-bizui.common.js +1523 -195
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.css +2 -2
- package/dist/imeik-bizui.css.gz +0 -0
- package/dist/imeik-bizui.umd.js +1523 -195
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +12 -12
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-view">
|
|
3
|
+
<el-button type="text" class="file-button">下载协议模版</el-button>
|
|
4
|
+
<ImFieldFileUpload v-model="myValue" :attrs="attrs"></ImFieldFileUpload>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: '',
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
myValue: [],
|
|
14
|
+
attrs: {}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
mounted() {},
|
|
18
|
+
methods: {}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
.file-button {
|
|
23
|
+
margin-bottom: 10px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -102,13 +102,13 @@ export default {
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
mounted() {
|
|
105
|
-
this.formConfig.props = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
105
|
+
// this.formConfig.props = {
|
|
106
|
+
// applyType: 1,
|
|
107
|
+
// doctor: [],
|
|
108
|
+
// motexinxi: '123123123123',
|
|
109
|
+
// zhusheshijian: '2023-10-09',
|
|
110
|
+
// kaishishijian: ['2023-10-09', '2023-10-11']
|
|
111
|
+
// }
|
|
112
112
|
},
|
|
113
113
|
methods: {
|
|
114
114
|
changeShowItems() {
|
|
@@ -132,4 +132,8 @@ export default {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
</script>
|
|
135
|
-
<style lang="scss" scoped
|
|
135
|
+
<style lang="scss" scoped>
|
|
136
|
+
.page-view {
|
|
137
|
+
// background-color: red;
|
|
138
|
+
}
|
|
139
|
+
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-view">
|
|
3
|
+
<el-dialog title="创建分批发货" :visible="show" width="1260px" destroy-on-close :before-close="handleClose">
|
|
4
|
+
<div v-if="show">
|
|
5
|
+
<div class="text-left pb-2 mb-2 flex">
|
|
6
|
+
<div class="flex">
|
|
7
|
+
<div class="title-line"></div>
|
|
8
|
+
<p class="title">产品信息</p>
|
|
9
|
+
</div>
|
|
10
|
+
<el-button type="primary" class="add-button" @click="addSubOrder">
|
|
11
|
+
<i class="el-icon-plus"></i>
|
|
12
|
+
添加
|
|
13
|
+
</el-button>
|
|
14
|
+
</div>
|
|
15
|
+
<MaterialList ref="basicsList" :selected-data="selectedData"></MaterialList>
|
|
16
|
+
<OrderList :table-data="selectedOrderList" @removeSubOrder="removeSubOrder"></OrderList>
|
|
17
|
+
</div>
|
|
18
|
+
<span slot="footer" class="dialog-footer">
|
|
19
|
+
<el-button @click="handleClose">取 消</el-button>
|
|
20
|
+
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
|
21
|
+
</span>
|
|
22
|
+
</el-dialog>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import MaterialList from './MaterialList.vue'
|
|
28
|
+
import OrderList from './OrderList.vue'
|
|
29
|
+
export default {
|
|
30
|
+
name: 'BatchDialog',
|
|
31
|
+
components: {
|
|
32
|
+
MaterialList,
|
|
33
|
+
OrderList
|
|
34
|
+
},
|
|
35
|
+
inject: {
|
|
36
|
+
formProps: {
|
|
37
|
+
default: () => {}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
show: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
45
|
+
selectedData: {
|
|
46
|
+
type: Array,
|
|
47
|
+
default: () => {}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
selectedOrderList: []
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
mounted() {},
|
|
56
|
+
methods: {
|
|
57
|
+
handleClose() {
|
|
58
|
+
this.selectedOrderList = []
|
|
59
|
+
this.$emit('update:show', false)
|
|
60
|
+
},
|
|
61
|
+
onConfirm() {
|
|
62
|
+
if (this.selectedOrderList?.length === 0) {
|
|
63
|
+
this.$message.warning('请拆单')
|
|
64
|
+
return
|
|
65
|
+
}
|
|
66
|
+
this.$emit('onConfirm', this.selectedOrderList)
|
|
67
|
+
this.selectedOrderList = []
|
|
68
|
+
},
|
|
69
|
+
addSubOrder() {
|
|
70
|
+
const list = this.$refs.basicsList.getSelectData()
|
|
71
|
+
if (list && list.length) {
|
|
72
|
+
this.selectedOrderList.push(list)
|
|
73
|
+
} else {
|
|
74
|
+
this.$message.warning('请检查数据')
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
removeSubOrder(data, index) {
|
|
78
|
+
this.selectedOrderList.splice(index, 1)
|
|
79
|
+
this.$refs.basicsList.handleDeleteData(data)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
<style lang="scss" scoped>
|
|
85
|
+
.title {
|
|
86
|
+
font-size: 15px;
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
color: #303133;
|
|
89
|
+
line-height: 21px;
|
|
90
|
+
}
|
|
91
|
+
.title-line {
|
|
92
|
+
width: 4px;
|
|
93
|
+
height: 15px;
|
|
94
|
+
background: #3285f6;
|
|
95
|
+
border-radius: 1px;
|
|
96
|
+
margin-right: 12px;
|
|
97
|
+
margin-top: 3px;
|
|
98
|
+
}
|
|
99
|
+
.add-button {
|
|
100
|
+
width: 60px !important;
|
|
101
|
+
height: 26px !important;
|
|
102
|
+
padding: 1px 0 0 0;
|
|
103
|
+
margin-top: -2px;
|
|
104
|
+
margin-left: 24px;
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ImTable :table="tableConfig">
|
|
4
|
+
<template slot="materialBasicsInfo" slot-scope="{ row }">
|
|
5
|
+
<el-tag type="danger">未签约</el-tag>
|
|
6
|
+
<el-tag effect="plain" class="ml-1">返货</el-tag>
|
|
7
|
+
<el-tag effect="plain" class="ml-1">赠品</el-tag>
|
|
8
|
+
<p class="materialName">啊实打实大师</p>
|
|
9
|
+
<p class="materialSubName">注射用透明复合溶液</p>
|
|
10
|
+
<p class="materialSubName">编码:40012u210120000</p>
|
|
11
|
+
<p class="materialSubName">商标:爱芙莱</p>
|
|
12
|
+
</template>
|
|
13
|
+
<template slot="materialCountInfo" slot-scope="{ row }">
|
|
14
|
+
<p class="materialSubName">申请数量:{{ row.productCount || '-' }}</p>
|
|
15
|
+
<p class="materialSubName">规格型号:2×0.5mL/盒(CEB)</p>
|
|
16
|
+
<p class="materialSubName">包装规格:2支/盒</p>
|
|
17
|
+
<p class="materialSubName">计量单位:盒</p>
|
|
18
|
+
</template>
|
|
19
|
+
<template slot="useCount" slot-scope="{ row }">
|
|
20
|
+
<p v-if="isView">{{ row.useCount }}</p>
|
|
21
|
+
<div v-else>
|
|
22
|
+
<el-input v-model="row.useCount" :class="{ error: row.quantityError }" placeholder="请输入" @input="handleInput(row)"></el-input>
|
|
23
|
+
<p v-if="row.quantityError" class="materialSubName" style="margin-top: 10px; color: red">发货数量不能大于剩余发货数量</p>
|
|
24
|
+
<p class="materialSubName" style="margin-top: 10px">剩余发货数量:{{ row.currentSurplusQuantity }}盒</p>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<template slot="materialQuantityTime" slot-scope="{ row }">
|
|
28
|
+
<p v-if="isView">{{ row.materialQuantityTime }}</p>
|
|
29
|
+
<el-date-picker v-else v-model="row.materialQuantityTime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"> </el-date-picker>
|
|
30
|
+
</template>
|
|
31
|
+
<template slot="remarks" slot-scope="{ row }">
|
|
32
|
+
<el-input v-if="!isView" v-model="row.remarks" type="textarea" :rows="5" show-word-limit maxlength="100" placeholder="请输入"></el-input>
|
|
33
|
+
<div v-else>{{ row.remarks || '-' }}</div>
|
|
34
|
+
</template>
|
|
35
|
+
</ImTable>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
export default {
|
|
41
|
+
name: 'MaterialList',
|
|
42
|
+
inject: {
|
|
43
|
+
formProps: {
|
|
44
|
+
default: () => {}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
tableData: {
|
|
49
|
+
type: Array,
|
|
50
|
+
default() {
|
|
51
|
+
return []
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
// 是否是查看页面
|
|
55
|
+
isView: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
selectedData: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default() {
|
|
62
|
+
return []
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
tableConfig: {
|
|
69
|
+
data: [],
|
|
70
|
+
tableItems: [
|
|
71
|
+
{
|
|
72
|
+
prop: 'materialBasicsInfo',
|
|
73
|
+
label: '名称',
|
|
74
|
+
type: 'slot',
|
|
75
|
+
slot: 'materialBasicsInfo',
|
|
76
|
+
attrs: {
|
|
77
|
+
'min-width': '240'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
prop: 'materialCountInfo',
|
|
82
|
+
label: '数量',
|
|
83
|
+
type: 'slot',
|
|
84
|
+
slot: 'materialCountInfo',
|
|
85
|
+
attrs: {
|
|
86
|
+
'min-width': '180'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
prop: 'useCount',
|
|
91
|
+
label: '发货数量',
|
|
92
|
+
type: 'slot',
|
|
93
|
+
slot: 'useCount',
|
|
94
|
+
attrs: {
|
|
95
|
+
'min-width': '180'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
prop: 'materialQuantityTime',
|
|
100
|
+
label: '发货时间',
|
|
101
|
+
type: 'slot',
|
|
102
|
+
slot: 'materialQuantityTime',
|
|
103
|
+
attrs: {
|
|
104
|
+
'min-width': '240'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
prop: 'remarks',
|
|
109
|
+
label: '备注',
|
|
110
|
+
type: 'slot',
|
|
111
|
+
slot: 'remarks',
|
|
112
|
+
attrs: {
|
|
113
|
+
'min-width': '160'
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
mounted() {
|
|
121
|
+
if (this.isView) {
|
|
122
|
+
this.tableConfig.data = JSON.parse(JSON.stringify(this.tableData))
|
|
123
|
+
} else {
|
|
124
|
+
/**
|
|
125
|
+
* 列数据新增2个属性
|
|
126
|
+
* currentSurplusQuantity 当前剩余发货量
|
|
127
|
+
* currentQuantityCount 分批之后当前物料实际申请数量
|
|
128
|
+
*/
|
|
129
|
+
this.tableConfig.data = this.handleCalculatedQuantity() || []
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
methods: {
|
|
133
|
+
// 计算当前的剩余发货量
|
|
134
|
+
handleCalculatedQuantity() {
|
|
135
|
+
try {
|
|
136
|
+
const data = JSON.parse(JSON.stringify(this.formProps.applicationApplyMaterial))
|
|
137
|
+
const allSelectData = this.getAllSelectData() || []
|
|
138
|
+
data.forEach((item) => {
|
|
139
|
+
item.currentQuantityCount = Number(item.productCount)
|
|
140
|
+
item.currentSurplusQuantity = Number(item.currentQuantityCount)
|
|
141
|
+
allSelectData.forEach((item2) => {
|
|
142
|
+
if (item.productCode === item2.productCode) {
|
|
143
|
+
item.currentQuantityCount = (item.currentQuantityCount || Number(item.productCount)) - Number(item2.useCount)
|
|
144
|
+
item.currentSurplusQuantity = Number(item.currentQuantityCount)
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
return data
|
|
149
|
+
} catch (error) {
|
|
150
|
+
console.log('初始化赋值数量出错:' + error)
|
|
151
|
+
return []
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
getAllSelectData() {
|
|
155
|
+
if (this.selectedData && this.selectedData.length) {
|
|
156
|
+
return this.selectedData.flat(2)
|
|
157
|
+
} else {
|
|
158
|
+
return []
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
handleInput(row) {
|
|
162
|
+
// 过滤掉非数字字符,并确保是正整数
|
|
163
|
+
row.useCount = row.useCount.replace(/^(0+)|[^\d]+/g, '')
|
|
164
|
+
this.setSurplusQuantityNumber(row)
|
|
165
|
+
},
|
|
166
|
+
// 设置剩余数量
|
|
167
|
+
setSurplusQuantityNumber(row) {
|
|
168
|
+
// currentQuantityCount 是分批之后当前物料实际剩余量数据
|
|
169
|
+
const currentCount = row.currentQuantityCount
|
|
170
|
+
// 再次计算剩余量
|
|
171
|
+
const surplusQuantity = currentCount - Number(row.useCount)
|
|
172
|
+
if (surplusQuantity < 0) {
|
|
173
|
+
row.currentSurplusQuantity = currentCount
|
|
174
|
+
row.quantityError = true
|
|
175
|
+
} else {
|
|
176
|
+
row.quantityError = false
|
|
177
|
+
row.currentSurplusQuantity = surplusQuantity
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
// 获取当前要拆单的数据
|
|
181
|
+
getSelectData() {
|
|
182
|
+
try {
|
|
183
|
+
const reslut = []
|
|
184
|
+
const data = JSON.parse(JSON.stringify(this.tableConfig.data))
|
|
185
|
+
if (!Array.isArray(data) || data.length === 0) {
|
|
186
|
+
return null
|
|
187
|
+
}
|
|
188
|
+
data.forEach((item, index) => {
|
|
189
|
+
if (item.useCount && item.materialQuantityTime && !item.quantityError) {
|
|
190
|
+
// 清空已经要入组的数据
|
|
191
|
+
this.tableConfig.data[index].useCount = ''
|
|
192
|
+
this.tableConfig.data[index].remarks = ''
|
|
193
|
+
this.tableConfig.data[index].materialQuantityTime = ''
|
|
194
|
+
this.tableConfig.data[index].currentQuantityCount = item.currentSurplusQuantity
|
|
195
|
+
reslut.push(item)
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
return reslut
|
|
199
|
+
} catch (error) {
|
|
200
|
+
console.error('Error in getSelectData:', error)
|
|
201
|
+
return null
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
// 删除子订单后释放剩余发货量
|
|
205
|
+
handleDeleteData(recordData) {
|
|
206
|
+
// TODO 判断的id还是占位
|
|
207
|
+
this.tableConfig.data.forEach((item, index) => {
|
|
208
|
+
recordData.forEach((record) => {
|
|
209
|
+
if (item.productCode === record.productCode) {
|
|
210
|
+
item.currentQuantityCount = Number(item.currentQuantityCount) + Number(record.useCount)
|
|
211
|
+
item.currentSurplusQuantity = item.currentQuantityCount
|
|
212
|
+
this.$set(this.tableConfig.data, index, { ...item })
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
</script>
|
|
220
|
+
<style lang="scss" scoped>
|
|
221
|
+
.materialName {
|
|
222
|
+
font-weight: 600;
|
|
223
|
+
font-size: 14px;
|
|
224
|
+
color: rgba(0, 0, 0, 0.85);
|
|
225
|
+
line-height: 22px;
|
|
226
|
+
margin-top: 4px;
|
|
227
|
+
}
|
|
228
|
+
.materialSubName {
|
|
229
|
+
font-size: 12px;
|
|
230
|
+
color: #595959;
|
|
231
|
+
line-height: 17px;
|
|
232
|
+
margin-top: 4px;
|
|
233
|
+
}
|
|
234
|
+
.materialCount {
|
|
235
|
+
width: 90px;
|
|
236
|
+
font-size: 12px;
|
|
237
|
+
color: #595959;
|
|
238
|
+
margin-bottom: 8px;
|
|
239
|
+
}
|
|
240
|
+
.delete-button {
|
|
241
|
+
color: #f4334a !important;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/deep/ .el-table .el-table__cell {
|
|
245
|
+
vertical-align: top;
|
|
246
|
+
}
|
|
247
|
+
/deep/ .el-table--medium .el-table__cell {
|
|
248
|
+
padding: 16px 0;
|
|
249
|
+
}
|
|
250
|
+
/deep/ .el-table .cell {
|
|
251
|
+
padding-left: 16px !important;
|
|
252
|
+
padding-right: 16px !important;
|
|
253
|
+
}
|
|
254
|
+
.error {
|
|
255
|
+
/deep/ .el-input__inner {
|
|
256
|
+
color: #f4334a;
|
|
257
|
+
border-color: #f4334a;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-for="(item, index) in tableData" :key="JSON.stringify(item) + index">
|
|
4
|
+
<div class="text-left ml-2 pb-2 mb-2 mt-4 flex">
|
|
5
|
+
<div class="flex">
|
|
6
|
+
<p class="title">分批发货 {{ index + 1 }}</p>
|
|
7
|
+
</div>
|
|
8
|
+
<el-button v-if="!isView" type="danger" class="add-button" @click="removeSubOrder(item, index)"> 删除 </el-button>
|
|
9
|
+
</div>
|
|
10
|
+
<MaterialList :table-data="item" :is-view="true"></MaterialList>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import MaterialList from './MaterialList'
|
|
17
|
+
export default {
|
|
18
|
+
name: 'OrderList',
|
|
19
|
+
components: {
|
|
20
|
+
MaterialList
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
tableData: {
|
|
24
|
+
type: Array,
|
|
25
|
+
default() {
|
|
26
|
+
return []
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
isView: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {}
|
|
36
|
+
},
|
|
37
|
+
mounted() {},
|
|
38
|
+
methods: {
|
|
39
|
+
removeSubOrder(data, index) {
|
|
40
|
+
this.$emit('removeSubOrder', data, index)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
.title {
|
|
47
|
+
font-size: 15px;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
color: #303133;
|
|
50
|
+
line-height: 21px;
|
|
51
|
+
}
|
|
52
|
+
.add-button {
|
|
53
|
+
width: 60px !important;
|
|
54
|
+
height: 26px !important;
|
|
55
|
+
padding: 1px 0 0 0;
|
|
56
|
+
margin-top: -2px;
|
|
57
|
+
margin-left: 24px;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-view">
|
|
3
|
+
<div>
|
|
4
|
+
<span>发货时效性:</span>
|
|
5
|
+
<el-radio v-model="radio" label="1">整单立即发货</el-radio>
|
|
6
|
+
<el-radio v-model="radio" label="2">分批延迟发货</el-radio>
|
|
7
|
+
<el-button v-show="showButotn" type="primary" @click="showBatchDialog">分批发货</el-button>
|
|
8
|
+
</div>
|
|
9
|
+
<OrderList v-if="showOrderList" :table-data="selectOrderList" :is-view="false" @removeSubOrder="removeSubOrder"></OrderList>
|
|
10
|
+
<BatchDialog :show.sync="showDialog" :selected-data="selectOrderList" @onConfirm="onConfirm"></BatchDialog>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import BatchDialog from './components/BatchDialog.vue'
|
|
16
|
+
import OrderList from './components/OrderList.vue'
|
|
17
|
+
export default {
|
|
18
|
+
name: 'FieldBatchesDelivery',
|
|
19
|
+
components: {
|
|
20
|
+
BatchDialog,
|
|
21
|
+
OrderList
|
|
22
|
+
},
|
|
23
|
+
inject: {
|
|
24
|
+
formProps: {
|
|
25
|
+
default: () => {}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
data() {
|
|
29
|
+
return {
|
|
30
|
+
radio: '1',
|
|
31
|
+
showDialog: false,
|
|
32
|
+
selectOrderList: []
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
computed: {
|
|
36
|
+
showButotn() {
|
|
37
|
+
const hasMaterial = this.formProps.applicationApplyMaterial?.length
|
|
38
|
+
const hasMaterialQuantity = this.formProps.applicationApplyMaterial?.every(
|
|
39
|
+
item => item.productCount
|
|
40
|
+
)
|
|
41
|
+
return this.radio === '2' && hasMaterial && hasMaterialQuantity
|
|
42
|
+
},
|
|
43
|
+
showOrderList() {
|
|
44
|
+
return this.selectOrderList && this.selectOrderList.length > 0
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
mounted() {},
|
|
48
|
+
methods: {
|
|
49
|
+
showBatchDialog() {
|
|
50
|
+
this.showDialog = true
|
|
51
|
+
},
|
|
52
|
+
onConfirm(data) {
|
|
53
|
+
this.showDialog = false
|
|
54
|
+
this.selectOrderList = this.selectOrderList.concat(data)
|
|
55
|
+
},
|
|
56
|
+
removeSubOrder(data, index) {
|
|
57
|
+
this.selectOrderList.splice(index, 1)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="title">
|
|
3
|
-
<slot name="label">{{ item.label }}</slot>
|
|
3
|
+
<!-- <slot name="label">{{ item.label }}</slot> -->
|
|
4
|
+
<div class="text-left pb-2 mb-1 flex">
|
|
5
|
+
<div class="flex">
|
|
6
|
+
<div class="title-line"></div>
|
|
7
|
+
<p class="title">{{ item.label }}</p>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
4
10
|
<slot name="card-header"></slot>
|
|
5
11
|
</div>
|
|
6
12
|
</template>
|
|
@@ -19,16 +25,17 @@ export default {
|
|
|
19
25
|
</script>
|
|
20
26
|
<style lang="scss" scoped>
|
|
21
27
|
.title {
|
|
22
|
-
|
|
23
|
-
height: 40px;
|
|
24
|
-
line-height: 40px;
|
|
25
|
-
font-size: 14px;
|
|
28
|
+
font-size: 15px;
|
|
26
29
|
font-weight: 600;
|
|
27
30
|
color: #303133;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
line-height: 21px;
|
|
32
|
+
}
|
|
33
|
+
.title-line {
|
|
34
|
+
width: 4px;
|
|
35
|
+
height: 15px;
|
|
36
|
+
background: #3285f6;
|
|
37
|
+
border-radius: 1px;
|
|
38
|
+
margin-right: 12px;
|
|
39
|
+
margin-top: 3px;
|
|
33
40
|
}
|
|
34
41
|
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-select v-model="company" class="w-full" placeholder="请选择" @change="onUpdate">
|
|
3
|
+
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
4
|
+
<p>【{{ item.tag }}】{{ item.label }}</p>
|
|
5
|
+
</el-option>
|
|
6
|
+
</el-select>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'FieldCompanySelect',
|
|
12
|
+
props: {
|
|
13
|
+
value: {
|
|
14
|
+
type: String,
|
|
15
|
+
default() {
|
|
16
|
+
return ''
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
isView: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
value: '选项1',
|
|
29
|
+
label: '股份',
|
|
30
|
+
tag: '123123'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: '选项2',
|
|
34
|
+
label: '科技'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: '选项3',
|
|
38
|
+
label: '长沙'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: '选项4',
|
|
42
|
+
label: '江苏'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
value: '选项5',
|
|
46
|
+
label: '砀山'
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
company: ''
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
watch: {
|
|
53
|
+
value(val) {
|
|
54
|
+
this.setMyValue()
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
mounted() {},
|
|
58
|
+
methods: {
|
|
59
|
+
setMyValue() {
|
|
60
|
+
this.company = this.value
|
|
61
|
+
},
|
|
62
|
+
onUpdate() {
|
|
63
|
+
this.$emit('input', this.company)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
<style lang="scss" scoped></style>
|