|
|
@ -58,6 +58,12 @@ |
|
|
|
>删 除 |
|
|
|
>删 除 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template slot-scope="scope" slot="menuBtn"> |
|
|
|
|
|
|
|
<el-dropdown-item v-if="scope.row.isDeliver != 2"> |
|
|
|
|
|
|
|
<i class="el-icon-sell"></i> |
|
|
|
|
|
|
|
<span @click="handleAllocate(3,scope)">出 库</span> |
|
|
|
|
|
|
|
</el-dropdown-item> |
|
|
|
|
|
|
|
</template> |
|
|
|
</avue-crud> |
|
|
|
</avue-crud> |
|
|
|
<el-dialog |
|
|
|
<el-dialog |
|
|
|
title="导入" |
|
|
|
title="导入" |
|
|
@ -71,11 +77,6 @@ |
|
|
|
v-model="excelForm" |
|
|
|
v-model="excelForm" |
|
|
|
:upload-after="uploadAfter" |
|
|
|
:upload-after="uploadAfter" |
|
|
|
> |
|
|
|
> |
|
|
|
<!-- <template slot="excelTemplate"> |
|
|
|
|
|
|
|
<el-button type="primary" @click="handleTemplate"> |
|
|
|
|
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i> |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
</template> --> |
|
|
|
|
|
|
|
</avue-form> |
|
|
|
</avue-form> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
<!-- 分拨弹窗 --> |
|
|
|
<!-- 分拨弹窗 --> |
|
|
@ -95,7 +96,7 @@ |
|
|
|
<el-form-item |
|
|
|
<el-form-item |
|
|
|
label="分拨租户" |
|
|
|
label="分拨租户" |
|
|
|
prop="tenantId" |
|
|
|
prop="tenantId" |
|
|
|
v-if="distitle == '分拨'" |
|
|
|
v-if="distitle == '分拨' || distitle == '出库'" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
v-model="distribution.tenantId" |
|
|
|
v-model="distribution.tenantId" |
|
|
@ -107,7 +108,7 @@ |
|
|
|
v-for="(item, index) in tenantlist" |
|
|
|
v-for="(item, index) in tenantlist" |
|
|
|
:label="item.tenantName" |
|
|
|
:label="item.tenantName" |
|
|
|
:value="item.tenantId" |
|
|
|
:value="item.tenantId" |
|
|
|
:key="item.tenantId" |
|
|
|
:key="item.index" |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -133,7 +134,7 @@ |
|
|
|
<el-form-item |
|
|
|
<el-form-item |
|
|
|
label="基础套餐" |
|
|
|
label="基础套餐" |
|
|
|
prop="dataPlanId" |
|
|
|
prop="dataPlanId" |
|
|
|
v-if="distitle == '分拨'" |
|
|
|
v-if="distitle == '分拨' || distitle == '出库'" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
v-model="distribution.dataPlanId" |
|
|
|
v-model="distribution.dataPlanId" |
|
|
@ -149,7 +150,11 @@ |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="开始/结束号码" prop="numbers"> |
|
|
|
<el-form-item |
|
|
|
|
|
|
|
label="开始/结束号码" |
|
|
|
|
|
|
|
prop="numbers" |
|
|
|
|
|
|
|
v-if="this.distitle != '出库'" |
|
|
|
|
|
|
|
> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item prop="numStart"> |
|
|
|
<el-form-item prop="numStart"> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
@ -197,6 +202,7 @@ import { |
|
|
|
simdeliver, |
|
|
|
simdeliver, |
|
|
|
dataplan, |
|
|
|
dataplan, |
|
|
|
simCallback, |
|
|
|
simCallback, |
|
|
|
|
|
|
|
deliver, |
|
|
|
} from "@/api/communication/basiccard"; |
|
|
|
} from "@/api/communication/basiccard"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import { getToken } from "@/util/auth"; |
|
|
|
import { getToken } from "@/util/auth"; |
|
|
@ -205,10 +211,7 @@ export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
var reg = /[A-Za-z]/i; |
|
|
|
var reg = /[A-Za-z]/i; |
|
|
|
var starts = (rule, value, callback) => { |
|
|
|
var starts = (rule, value, callback) => { |
|
|
|
if ( |
|
|
|
if (this.distribution.numEnd == "" || this.distribution.numStart == "") { |
|
|
|
this.distribution.numEnd == "" || |
|
|
|
|
|
|
|
this.distribution.numStart == "" |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
callback(new Error("开始号码结束号码均不能为空")); |
|
|
|
callback(new Error("开始号码结束号码均不能为空")); |
|
|
|
} else if ( |
|
|
|
} else if ( |
|
|
|
this.distribution.numEnd < 0 || |
|
|
|
this.distribution.numEnd < 0 || |
|
|
@ -220,11 +223,11 @@ export default { |
|
|
|
) { |
|
|
|
) { |
|
|
|
callback(new Error("开始号码必须小于结束号码")); |
|
|
|
callback(new Error("开始号码必须小于结束号码")); |
|
|
|
} else if ( |
|
|
|
} else if ( |
|
|
|
reg.test(this.distribution.numStart) == true|| reg.test(this.distribution.numEnd) == true |
|
|
|
reg.test(this.distribution.numStart) == true || |
|
|
|
|
|
|
|
reg.test(this.distribution.numEnd) == true |
|
|
|
) { |
|
|
|
) { |
|
|
|
callback(new Error("开始结束号码中包含字母,请选择其他导出类型")); |
|
|
|
callback(new Error("开始结束号码中包含字母,请选择其他导出类型")); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
callback(); |
|
|
|
callback(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -405,6 +408,8 @@ export default { |
|
|
|
selection: true, |
|
|
|
selection: true, |
|
|
|
dialogClickModal: false, |
|
|
|
dialogClickModal: false, |
|
|
|
dialogWidth: "60%", |
|
|
|
dialogWidth: "60%", |
|
|
|
|
|
|
|
menuType: "menu", |
|
|
|
|
|
|
|
menuWidth: "120", |
|
|
|
column: [ |
|
|
|
column: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "id", |
|
|
|
label: "id", |
|
|
@ -625,6 +630,7 @@ export default { |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: [], |
|
|
|
data: [], |
|
|
|
|
|
|
|
deliverId:"",//出库id |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -729,7 +735,7 @@ export default { |
|
|
|
rowSave(row, done, loading) { |
|
|
|
rowSave(row, done, loading) { |
|
|
|
add(row).then( |
|
|
|
add(row).then( |
|
|
|
(res) => { |
|
|
|
(res) => { |
|
|
|
if (res.data.data == true) { |
|
|
|
if (res.data.data == 1) { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
@ -755,7 +761,7 @@ export default { |
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
update(row).then( |
|
|
|
update(row).then( |
|
|
|
(res) => { |
|
|
|
(res) => { |
|
|
|
if (res.data.data == true) { |
|
|
|
if (res.data.data == 1) { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
@ -896,11 +902,15 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//分拨弹窗开启 |
|
|
|
//分拨弹窗开启 |
|
|
|
handleAllocate(e) { |
|
|
|
handleAllocate(e,row) { |
|
|
|
if (e == 1) { |
|
|
|
if (e == 1) { |
|
|
|
this.distitle = "分拨"; |
|
|
|
this.distitle = "分拨"; |
|
|
|
} else { |
|
|
|
} else if (e == 2) { |
|
|
|
this.distitle = "回拨"; |
|
|
|
this.distitle = "回拨"; |
|
|
|
|
|
|
|
} else if (e == 3) { |
|
|
|
|
|
|
|
this.distitle = "出库"; |
|
|
|
|
|
|
|
this.deliverId = row.row.id; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.dialogVisible = true; |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -919,6 +929,7 @@ export default { |
|
|
|
this.$message.success("操作成功"); |
|
|
|
this.$message.success("操作成功"); |
|
|
|
this.$refs.distribution.resetFields(); |
|
|
|
this.$refs.distribution.resetFields(); |
|
|
|
this.dialogVisible = false; |
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const h = this.$createElement; |
|
|
|
const h = this.$createElement; |
|
|
|
this.$notify.error({ |
|
|
|
this.$notify.error({ |
|
|
@ -934,12 +945,13 @@ export default { |
|
|
|
this.dialogVisible = false; |
|
|
|
this.dialogVisible = false; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else if (this.distitle == "回拨") { |
|
|
|
simCallback(this.distribution).then((res) => { |
|
|
|
simCallback(this.distribution).then((res) => { |
|
|
|
if (res.data.data == "") { |
|
|
|
if (res.data.data == "") { |
|
|
|
this.$message.success("操作成功"); |
|
|
|
this.$message.success("操作成功"); |
|
|
|
this.$refs.distribution.resetFields(); |
|
|
|
this.$refs.distribution.resetFields(); |
|
|
|
this.dialogVisible = false; |
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const h = this.$createElement; |
|
|
|
const h = this.$createElement; |
|
|
|
this.$notify.error({ |
|
|
|
this.$notify.error({ |
|
|
@ -955,8 +967,24 @@ export default { |
|
|
|
this.dialogVisible = false; |
|
|
|
this.dialogVisible = false; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} else if (this.distitle == "出库") { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deliver( |
|
|
|
|
|
|
|
this.distribution.tenantId, |
|
|
|
|
|
|
|
this.distribution.dataPlanId, |
|
|
|
|
|
|
|
this.deliverId |
|
|
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
|
|
if (res.data.data == 1) { |
|
|
|
|
|
|
|
this.$message.success("操作成功"); |
|
|
|
|
|
|
|
this.$refs.distribution.resetFields(); |
|
|
|
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
this.$refs.distribution.resetFields(); |
|
|
|
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|