|
|
|
@ -5,11 +5,18 @@
|
|
|
|
|
<h2 style="text-align: center">数据同步功能</h2> |
|
|
|
|
<h5 style="text-align: center"> |
|
|
|
|
输入订单自编号进行数据同步,多个订单自编号使用英文逗号进行分隔 |
|
|
|
|
</h5> |
|
|
|
|
<h5 style="text-align: center"> 运单号只能单个同步 |
|
|
|
|
</h5> |
|
|
|
|
<h5></h5> |
|
|
|
|
</div> |
|
|
|
|
<div class="el_btn"> |
|
|
|
|
<el-input v-model="input" placeholder="请输入订单自编号,多个订单自编号用英文,逗号隔开"> |
|
|
|
|
<el-radio-group v-model="check" class="ml-4" > |
|
|
|
|
<el-radio label="1" size="large">订单同步</el-radio> |
|
|
|
|
<el-radio label="2" size="large">运单同步</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
|
|
<el-input v-model="input" placeholder="请输入订单自编号/运单号,订单自编号用英文,逗号隔开"> |
|
|
|
|
<template #append> |
|
|
|
|
<el-button type="primary" @click="synchronization">点击同步</el-button> |
|
|
|
|
</template> |
|
|
|
@ -23,8 +30,12 @@
|
|
|
|
|
import { $_syncOrder } from '@/api/aftersales/aftersalesWorkOrder'; |
|
|
|
|
import { ref } from 'vue'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const loading = ref(false); |
|
|
|
|
const input = ref(''); // |
|
|
|
|
|
|
|
|
|
const check = ref('1'); // |
|
|
|
|
// 检测是否输入了中文逗号 |
|
|
|
|
function checkInput(input) { |
|
|
|
|
const regex = /,/; |
|
|
|
@ -33,6 +44,8 @@ function checkInput(input) {
|
|
|
|
|
|
|
|
|
|
// 点击同步 |
|
|
|
|
const synchronization = () => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!input.value) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请输入订单自编号', |
|
|
|
@ -52,6 +65,7 @@ const synchronization = () => {
|
|
|
|
|
loading.value = true; //开启加载 |
|
|
|
|
let data = { |
|
|
|
|
orderCodes: input.value, |
|
|
|
|
syncType:check.value |
|
|
|
|
}; |
|
|
|
|
console.log(data, '处理好的参数'); |
|
|
|
|
$_syncOrder(data).then(res => { |
|
|
|
|