|
|
|
@ -7,6 +7,7 @@
|
|
|
|
|
:model="filterQuery"
|
|
|
|
|
label-width="480px"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-if="searchVisible"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
@ -114,29 +115,16 @@
|
|
|
|
|
>详情
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="deleteDialog(scope.row.id)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- @click.native.stop="deleteDialog(scope.row.id)"-->
|
|
|
|
|
<!-- >删除-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="导出PDF"
|
|
|
|
|
:visible.sync="successOrderExportPDFSettingVisible"
|
|
|
|
|
width="80%"
|
|
|
|
|
v-if="successOrderExportPDFSettingVisible"
|
|
|
|
|
@close='closeDialog'
|
|
|
|
|
>
|
|
|
|
|
<successOrderExportPDFSetting
|
|
|
|
|
:closeDialog="closeDialog"
|
|
|
|
|
:idQuery="idQuery"
|
|
|
|
|
></successOrderExportPDFSetting>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="filterQuery.limit"
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
@ -203,64 +191,6 @@
|
|
|
|
|
></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="选择往来单位"
|
|
|
|
|
:visible.sync="dialogTableVisible"
|
|
|
|
|
width="70%"
|
|
|
|
|
>
|
|
|
|
|
<el-form :inline="true" :model="query" class="query-form" size="mini">
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="unitquery.key" placeholder="搜索"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="search"
|
|
|
|
|
@click.native.stop="getUnitList()"
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="unitlist"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@row-click="selectUnit"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column label="往来单位ID" prop="unitId"></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="往来单位名称"
|
|
|
|
|
prop="name"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="往来单位简写"
|
|
|
|
|
prop="spell"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="地址"
|
|
|
|
|
prop="addr"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column label="状态" prop="status"></el-table-column>
|
|
|
|
|
<el-table-column label="类型" prop="type"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="选择业务单据"
|
|
|
|
|
:visible.sync="addDialogVisible"
|
|
|
|
|
width="80%"
|
|
|
|
|
v-if="addDialogVisible"
|
|
|
|
|
>
|
|
|
|
|
<selectErpOrder
|
|
|
|
|
v-on:closeManuDialog="closeManuDialog"
|
|
|
|
|
:orderId="orderId"
|
|
|
|
|
></selectErpOrder>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="单号详情"
|
|
|
|
|
:visible.sync="codeDetailVisible"
|
|
|
|
@ -273,14 +203,6 @@
|
|
|
|
|
></codeDetail>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="校验信息" :visible.sync="errDialogVisible" width="30%">
|
|
|
|
|
<span>{{ errorDetail }}</span>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="errDialogVisible = false"
|
|
|
|
|
>关 闭</el-button
|
|
|
|
|
>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -317,12 +239,6 @@ import {filterOrderTrace} from "@/api/inventory/invCodeTrace";
|
|
|
|
|
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
|
|
|
|
import A from "@/plugin/KeyScaner";
|
|
|
|
|
|
|
|
|
|
const formJson = {
|
|
|
|
|
site_id: "",
|
|
|
|
|
site_name: "",
|
|
|
|
|
describe: "",
|
|
|
|
|
ads: [],
|
|
|
|
|
};
|
|
|
|
|
export default {
|
|
|
|
|
name: "invUdiTraceOrder",
|
|
|
|
|
props: {
|
|
|
|
@ -330,12 +246,20 @@ export default {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
diloadTrue: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
udiCode: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
query: {
|
|
|
|
|
code: null,
|
|
|
|
|
filterQuery: {
|
|
|
|
|
code: "",
|
|
|
|
|
batchNo: null,
|
|
|
|
|
productIdFk: null,
|
|
|
|
|
customerId: null,
|
|
|
|
@ -343,6 +267,7 @@ export default {
|
|
|
|
|
limit: 20,
|
|
|
|
|
supId: null,
|
|
|
|
|
},
|
|
|
|
|
searchVisible: true,
|
|
|
|
|
sitcomScan: false,
|
|
|
|
|
checkStatus: {
|
|
|
|
|
1: "校验异常",
|
|
|
|
@ -351,9 +276,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
fromOptions: [],
|
|
|
|
|
erpCheckStatus: {
|
|
|
|
|
// error: "校验异常",
|
|
|
|
|
// null: "未校验",
|
|
|
|
|
// success: "正常",
|
|
|
|
|
1: "校验异常",
|
|
|
|
|
0: "未校验",
|
|
|
|
|
2: "校验成功",
|
|
|
|
@ -367,28 +289,12 @@ export default {
|
|
|
|
|
"6": "缺量补录单据",
|
|
|
|
|
"7": "UDI供应商平台",
|
|
|
|
|
"8": "平衡补录单据",
|
|
|
|
|
"10":"手动补单"
|
|
|
|
|
"10": "手动补单"
|
|
|
|
|
},
|
|
|
|
|
//往来单位
|
|
|
|
|
unitquery: {key: "", page: 1, limit: 20},
|
|
|
|
|
unitlist: [],
|
|
|
|
|
list: [],
|
|
|
|
|
detailList: [],
|
|
|
|
|
unitUpdateQuery: {
|
|
|
|
|
id: "",
|
|
|
|
|
fromCorpId: "",
|
|
|
|
|
fromCorp: "",
|
|
|
|
|
},
|
|
|
|
|
actDateRange: [],
|
|
|
|
|
filterQuery: {
|
|
|
|
|
code: null,
|
|
|
|
|
batchNo: null,
|
|
|
|
|
productIdFk: null,
|
|
|
|
|
customerId: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
supId: null,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
detailQuery: {
|
|
|
|
|
orderId: "",
|
|
|
|
|
},
|
|
|
|
@ -400,11 +306,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
curIndex: "",
|
|
|
|
|
adListNoDataText: "无数据",
|
|
|
|
|
queryAdIdAsyncLoading: false,
|
|
|
|
|
codeDetailVisible: false,
|
|
|
|
|
successOrderExportPDFSettingVisible: false,
|
|
|
|
|
total: 0,
|
|
|
|
|
loading: true,
|
|
|
|
|
loading: false,
|
|
|
|
|
index: null,
|
|
|
|
|
formName: null,
|
|
|
|
|
orderId: "",
|
|
|
|
@ -412,10 +316,6 @@ export default {
|
|
|
|
|
add: "新增",
|
|
|
|
|
edit: "编辑",
|
|
|
|
|
},
|
|
|
|
|
exportQuery: {
|
|
|
|
|
orderId: "",
|
|
|
|
|
exportStatus: "",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
uploadQuery: {
|
|
|
|
|
orderId: "",
|
|
|
|
@ -425,48 +325,14 @@ export default {
|
|
|
|
|
dialogTableVisible: false,
|
|
|
|
|
formLoading: false,
|
|
|
|
|
formVisible: false,
|
|
|
|
|
formData: formJson,
|
|
|
|
|
deleteLoading: false,
|
|
|
|
|
addDialogVisible: false,
|
|
|
|
|
errDialogVisible: false,
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
shortcuts: [
|
|
|
|
|
{
|
|
|
|
|
text: "最近一周",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "最近一个月",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "最近三个月",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
draggable,
|
|
|
|
|
codeDetail,
|
|
|
|
|
successOrderExportPDFSetting,
|
|
|
|
|
selectErpOrder,
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onReset() {
|
|
|
|
@ -482,7 +348,6 @@ export default {
|
|
|
|
|
limit: 20,
|
|
|
|
|
supId: null,
|
|
|
|
|
};
|
|
|
|
|
this.actDateRange = [];
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -505,11 +370,6 @@ export default {
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleErrorDetail(poistion) {
|
|
|
|
|
var mOrder = this.list[poistion];
|
|
|
|
|
this.errorDetail = mOrder.remark;
|
|
|
|
|
this.errDialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
findMethod(query) {
|
|
|
|
|
this.fromOptions = [];
|
|
|
|
|
let cQuery = {
|
|
|
|
@ -524,56 +384,6 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
mergesOrders() {
|
|
|
|
|
var repeatData = this.multipleSelection;
|
|
|
|
|
if (repeatData.length <= 1) {
|
|
|
|
|
this.$message.warning("选择的订单需大于1");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var orderid = repeatData[0].id;
|
|
|
|
|
var unit = repeatData[0].fromCorp;
|
|
|
|
|
var action = repeatData[0].action;
|
|
|
|
|
var orderList = [];
|
|
|
|
|
repeatData.forEach((obj, index) => {
|
|
|
|
|
if (unit !== obj.fromCorp) {
|
|
|
|
|
this.$message.warning("往来单位不一致!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (action !== obj.action) {
|
|
|
|
|
this.$message.warning("业务类型不一致!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
orderList.push(obj.id);
|
|
|
|
|
});
|
|
|
|
|
var tquery = {
|
|
|
|
|
orderList: orderList,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.$confirm(
|
|
|
|
|
"所选择的订单将会合并到订单号为" + orderid + "的订单下",
|
|
|
|
|
"提示",
|
|
|
|
|
{
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
.then(() => {
|
|
|
|
|
mergeOrder(tquery).then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "合并成功",
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//获取订单列表
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -613,31 +423,6 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
this.refresgOrderDetail();
|
|
|
|
|
},
|
|
|
|
|
repeatCheckClick(row) {
|
|
|
|
|
let tQuery = {
|
|
|
|
|
orderId: row.id,
|
|
|
|
|
};
|
|
|
|
|
this.loading = true;
|
|
|
|
|
repeatCheck(tQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.$message.success(response.data);
|
|
|
|
|
this.getList();
|
|
|
|
|
this.detailQuery = {
|
|
|
|
|
orderId: row.id,
|
|
|
|
|
};
|
|
|
|
|
this.refresgOrderDetail();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
refresgOrderDetail() {
|
|
|
|
|
orderDetail(this.detailQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
@ -650,21 +435,6 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleUnitClick(row) {
|
|
|
|
|
this.curIndex = row.id;
|
|
|
|
|
// this.dialogTableVisible = true;
|
|
|
|
|
},
|
|
|
|
|
getUnitList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
unitListBykey(this.unitquery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.unitlist = response.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
intentDetail(row) {
|
|
|
|
|
// this.$router.push({
|
|
|
|
|
// path: "../inout/detail",
|
|
|
|
@ -674,60 +444,11 @@ export default {
|
|
|
|
|
this.codeDetailVisible = true;
|
|
|
|
|
this.idQuery.id = row.id;
|
|
|
|
|
},
|
|
|
|
|
successOrderExportPDFSetting(row) {
|
|
|
|
|
this.idQuery.id = '';
|
|
|
|
|
if (this.$isNotBlank(row.id)) {
|
|
|
|
|
this.idQuery.id = row.id;
|
|
|
|
|
}
|
|
|
|
|
this.successOrderExportPDFSettingVisible = true;
|
|
|
|
|
},
|
|
|
|
|
successOrderExportPDF(row) {
|
|
|
|
|
let tQuery = {
|
|
|
|
|
orderId: row.id,
|
|
|
|
|
customerId: store.getters.customerId
|
|
|
|
|
}
|
|
|
|
|
this.loading = true;
|
|
|
|
|
inspectionOrderDetailPDFFromTemplateFile(tQuery).then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
orderDetailPDFFromTemplateFile(tQuery).then((response) => {
|
|
|
|
|
//将pdf文件转换为url。
|
|
|
|
|
const binaryData = [];
|
|
|
|
|
binaryData.push(response);
|
|
|
|
|
//获取blob链接。
|
|
|
|
|
let url = window.URL.createObjectURL(
|
|
|
|
|
new Blob(binaryData, {type: "application/pdf"})
|
|
|
|
|
);
|
|
|
|
|
this.loading = false;
|
|
|
|
|
window.open(url);//打开新标签页,预览pdf。
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.successOrderExportPDFSettingVisible = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
selectUnit(row) {
|
|
|
|
|
this.unitUpdateQuery.id = this.curIndex;
|
|
|
|
|
this.unitUpdateQuery.fromCorp = row.name;
|
|
|
|
|
this.unitUpdateQuery.fromCorpId = row.unitid;
|
|
|
|
|
updateUnit(this.unitUpdateQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.dialogTableVisible = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.dialogTableVisible = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
deleteOrders(data) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.deleteData.id = data;
|
|
|
|
@ -751,140 +472,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
exportDialog(value) {
|
|
|
|
|
var mOrder = value;
|
|
|
|
|
if (mOrder.exportStatus === "已上传") {
|
|
|
|
|
this.$confirm("该订单已修改, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.uploadOrderDialog(mOrder);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else if (mOrder.contrastStatus === 0) {
|
|
|
|
|
this.$confirm("该订单校验异常, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.uploadOrderDialog(mOrder);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else if (mOrder.contrastStatus === null) {
|
|
|
|
|
this.$confirm("该订单未校验, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.uploadOrderDialog(mOrder);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$confirm("是否确定修改ERP订单?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.uploadOrderDialog(mOrder);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
exportXml(poistion) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
var mOrder = this.list[poistion];
|
|
|
|
|
var corpOrderId = mOrder.id;
|
|
|
|
|
var codeArry;
|
|
|
|
|
this.query = {
|
|
|
|
|
corpOrderId: corpOrderId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
};
|
|
|
|
|
findAllByOrderId(this.query) //查找该单号下的所有条码
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
codeArry = response.data.list || [];
|
|
|
|
|
var document =
|
|
|
|
|
'<?xml version="1.0" encoding="utf-8"?>\n' +
|
|
|
|
|
'<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="终端接口XML Schema-2.0.xsd" SN="" Version="3.0" License="123456">\n' +
|
|
|
|
|
"<Events>\n" +
|
|
|
|
|
'<Event Name="' +
|
|
|
|
|
mOrder.action +
|
|
|
|
|
'" MainAction="' +
|
|
|
|
|
mOrder.mainAction +
|
|
|
|
|
'">' +
|
|
|
|
|
"<ActionMaping>\n" +
|
|
|
|
|
'<Action Name="' +
|
|
|
|
|
mOrder.mainAction +
|
|
|
|
|
'">\n' +
|
|
|
|
|
"<ActionData>Code</ActionData>\n" +
|
|
|
|
|
"<ActionData>CorpOrderID</ActionData>\n" +
|
|
|
|
|
"<ActionData>Actor</ActionData>\n" +
|
|
|
|
|
"<ActionData>ActDate</ActionData>\n" +
|
|
|
|
|
"<ActionData>ToCorpID</ActionData>\n" +
|
|
|
|
|
"</Action>\n" +
|
|
|
|
|
" </ActionMaping>\n" +
|
|
|
|
|
"<DataMaping>\n" +
|
|
|
|
|
'<MetaData Name="Code" Type="string" />\n' +
|
|
|
|
|
'<MetaData Name="CorpOrderID" Type="string" />\n' +
|
|
|
|
|
'<MetaData Name="Actor" Type="string" />\n' +
|
|
|
|
|
'<MetaData Name="ActDate" Type="Date" />\n' +
|
|
|
|
|
'<MetaData Name="ToCorpID" Type="string" />\n' +
|
|
|
|
|
"</DataMaping>\n" +
|
|
|
|
|
"<DataField>\n";
|
|
|
|
|
for (var value of codeArry) {
|
|
|
|
|
if (value.fromCorpId === null) {
|
|
|
|
|
value.fromCorpId = "";
|
|
|
|
|
}
|
|
|
|
|
var tempdata =
|
|
|
|
|
' <Data Code="' +
|
|
|
|
|
value.code +
|
|
|
|
|
'" CorpOrderID="' +
|
|
|
|
|
value.corpOrderId +
|
|
|
|
|
'" Actor="' +
|
|
|
|
|
value.actor +
|
|
|
|
|
'" ActDate="' +
|
|
|
|
|
value.actDate +
|
|
|
|
|
'" ToCorpID="' +
|
|
|
|
|
value.fromCorpId +
|
|
|
|
|
'" />\n';
|
|
|
|
|
|
|
|
|
|
document = document + tempdata;
|
|
|
|
|
}
|
|
|
|
|
document =
|
|
|
|
|
document +
|
|
|
|
|
"</DataField>\n" +
|
|
|
|
|
"</Event>\n" +
|
|
|
|
|
"</Events>\n" +
|
|
|
|
|
"</Document>\n";
|
|
|
|
|
|
|
|
|
|
var blob = new Blob([document], {
|
|
|
|
|
type: "text/plain;charset=utf-8",
|
|
|
|
|
});
|
|
|
|
|
saveAs(blob, mOrder.action + mOrder.corpOrderId + ".xml");
|
|
|
|
|
|
|
|
|
|
this.exportQuery.orderId = corpOrderId;
|
|
|
|
|
this.exportQuery.exportStatus = "已上传";
|
|
|
|
|
updateExportStatus(this.exportQuery).then((response) => {
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
uploadOrderDialog(value) {
|
|
|
|
|
this.uploadQuery = {
|
|
|
|
@ -975,7 +562,7 @@ export default {
|
|
|
|
|
window.sc = new A.KeyScaner(inputer);
|
|
|
|
|
sc.onInput = function (text) {
|
|
|
|
|
if (text.includes("delete")) {
|
|
|
|
|
that.formData.code = "";
|
|
|
|
|
that.filterQuery.code = "";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (that.sitcomScan) {
|
|
|
|
@ -989,16 +576,17 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
created() {
|
|
|
|
|
if (this.$isNotBlank(this.udiCode)) {
|
|
|
|
|
|
|
|
|
|
if (!this.diloadTrue) {
|
|
|
|
|
this.searchVisible = false;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.diloadTrue + "----" + this.searchVisible);
|
|
|
|
|
|
|
|
|
|
this.filterQuery.code = this.udiCode;
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
this.getBusType();
|
|
|
|
|
let query = this.$route.query;
|
|
|
|
|
this.query = Object.assign(this.query, query);
|
|
|
|
|
this.query.limit = parseInt(this.query.limit);
|
|
|
|
|
// 加载表格数据
|
|
|
|
|
this.getList();
|
|
|
|
|
let end = new Date();
|
|
|
|
|
let start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
|
this.actDateRange = [start, end];
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|