【新增】支付弹窗和修复bug

This commit is contained in:
yanran200830
2024-10-30 17:29:21 +08:00
parent 4b6e221369
commit 4bfb4c2d1a
5 changed files with 250 additions and 106 deletions

View File

@@ -72,10 +72,10 @@
mounted() {
this.printData = {
labelCode: 96778555251,
productSkuId: 6606980005,
skuExtCode: 'AAA1100mWh-orange',
skuSpecName: '8pcs'
labelCode: 123456789,
productSkuId: `XXXXXXXXXXXXXX`,
skuExtCode: 'XXXXXXXXXXXXXX',
skuSpecName: 'XXXXX'
}
if (this.$route.query.id) {

View File

@@ -53,20 +53,6 @@
clearable
suffix-icon="iconfont iconSearch">
</el-input>
<el-select
clearable
v-model="search.templateId"
placeholder="请选择模板"
size="small"
@change="getList"
style="margin-left: 10px;">
<el-option
v-for="item in templateList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-button style="margin-left: 10px;" @click="getList" size="small" :loading="isLoading">查询</el-button>
</div>
</div>
@@ -93,7 +79,7 @@
width="890px"
@confirm="onConfirm">
<el-form class="ai-form" :model="form" ref="form" label-width="100px">
<el-form-item label="标签名称" style="width: 100%;" prop="count" :rules="[{ required: true, message: '请输入打印数量', trigger: 'change' }]">
<el-form-item label="打印数量" style="width: 100%;" prop="count" :rules="[{ required: true, message: '请输入打印数量', trigger: 'change' }]">
<el-input-number v-model="form.count" :min="1" :max="500" label="请输入打印数量"></el-input-number>
</el-form-item>
</el-form>
@@ -159,21 +145,12 @@
},
mounted() {
this.getTemplateList()
this.$nextTick(() => {
this.height = document.querySelector('.ai-list__content--right').clientHeight - 140
})
},
methods: {
getTemplateList () {
this.$http.post('/api/template/getPage?size=-1').then(res => {
if (res.code === 0) {
this.templateList = res.data.records
}
})
},
toPrint(row) {
this.isLoading = true
if (this.addType === '1') {
@@ -184,7 +161,6 @@
}
this.$http.post(`/api/template/detail?id=${res.data.records[0].id}`).then(res => {
this.isLoading = false
if (res.code === 0) {
const params = JSON.parse(res.data.params)
const getValue = v => params.filter(e => e.fieldValue === v)[0].fieldName
@@ -194,7 +170,10 @@
}
})
this.isLoading = false
this.$refs.printRef.toPrint(JSON.parse(res.data.content), new Array(row.deliveryNum).fill(row))
} else {
this.isLoading = false
}
})
})