zhanbo.xu

feat: 新增hscode

......@@ -22,3 +22,32 @@ export function getExportArrivalInDetails({ id }) {
method: "get",
});
}
// /hsCodeMgr/getHsCodeList
export function getHsCodeList(data) {
return request({
url: "/bus-customer/hsCodeMgr/getHsCodeList",
method: "post",
data: data,
});
}
// GET
// ​/hsCodeMgr​/hsCodeIncr
// 增量数据同步
export function getHsCodeIncr() {
return request({
url: "/bus-customer/hsCodeMgr/hsCodeIncr",
method: "get",
});
}
// GET
// ​/hsCodeMgr​/singleSync​/{id}
// 单条hsCode同步更新;
export function getHsCodeSingleSync({ id }) {
return request({
url: `/bus-customer/hsCodeMgr/singleSync/${id}`,
method: "get",
});
}
......
......@@ -9,26 +9,26 @@
>
<el-row class="row-border">
<el-col :span="5">
<Formitem label="商品编号" prop="billNo">
<Formitem label="商品编号" prop="skuCode">
<el-input
type="text"
class="inputShadow"
id="inputInner--billNo"
id="inputInner--skuCode"
resize="none"
v-model="sreachFormData.billNo"
v-model="sreachFormData.skuCode"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<el-col :span="5">
<Formitem label="商品名称" prop="operatorCode">
<Formitem label="商品名称" prop="skuname">
<el-input
type="text"
class="inputShadow"
id="inputInner--operatorCode"
id="inputInner--skuname"
resize="none"
v-model="sreachFormData.operatorCode"
v-model="sreachFormData.skuname"
clearable
placeholder=""
></el-input>
......@@ -112,53 +112,6 @@
@tableSelectAll="tableSelectAll"
:selected="selected"
>
<template v-slot:billNo="scope">
<el-button type="text" @click.stop="linkChange(scope)">
{{ scope.row.billNo }}
</el-button>
</template>
<!-- <template v-slot:listReceiptStatus="scope">
<TablePopover
ref="listReceiptStatusPopover"
dataKey="listReceiptStatus"
idKey="declareId"
:parentDom="$refs.entryTable"
:receiptDataHead="receiptDataHead"
:rowData="scope.row"
:tableData="tableData"
@popoverChange="popoverChange"
@popoverClose="popoverClose"
>
<div slot="title">
<span style="font-weight: 700; color: #515a6e">订单编号:</span
>{{ scope.row.orderno }}
</div>
<div slot="buttonLabel">
{{ scope.row.listReceiptStatus }}
</div>
</TablePopover>
</template> -->
<!-- <template v-slot:arrivalInReceiptStatus="scope">
<TablePopover
ref="arrivalInReceiptStatusPopover"
dataKey="arrivalInReceiptStatus"
idKey="declareId"
:parentDom="$refs.entryTable"
:receiptDataHead="receiptDataHead"
:rowData="scope.row"
:tableData="tableData"
@popoverChange="popoverChange"
@popoverClose="popoverClose"
>
<div slot="title">
<span style="font-weight: 700; color: #515a6e">提运单号:</span
>{{ scope.row.billNo }}
</div>
<div slot="buttonLabel">
{{ scope.row.arrivalInReceiptStatus }}
</div>
</TablePopover>
</template> -->
</Table>
<DialogVue
:outerVisible="outerVisible"
......@@ -169,7 +122,7 @@
</template>
<script>
import { getArrivalIneList, arrivalInReceipt } from "@/api/declareData-api.js";
import { getHsCodeList } from "@/api/arrivalList-api.js";
import DialogVue from "./dialog.vue";
export default {
name: "SupervisePlaceManage",
......@@ -178,17 +131,10 @@ export default {
},
data() {
return {
// 控制日志弹窗的显示和隐藏
allLogDataReceiptStatusPopoverType: false,
// 存储选中的日志数据
selectedLogRow: {},
selected: [],
sreachFormData: {
billNo: "",
operatorCode: "",
operatorName: "",
receiptStatus: null,
receiptType: null,
skuCode: "",
skuname: "",
createTime: [],
},
page: {
......@@ -201,44 +147,43 @@ export default {
headerData: [
{
name: "序号",
value: "billNo",
value: "gnum",
width: "",
align: "left",
slot: true,
},
{
name: "商品编号",
value: "operatorCode",
value: "skuCode",
width: "",
align: "left",
},
{
name: "商品名称",
value: "operatorName",
value: "skuname",
width: "",
align: "left",
},
{
name: "申报要素",
value: "ecomEntName",
value: "declarationElement",
width: "",
align: "left",
},
{
name: "第一法定单位",
value: "createTime",
value: "unitLegalFirst",
width: "",
align: "left",
},
{
name: "第二法定单位",
value: "listReceiptStatus",
value: "unitLegalSecond",
width: "",
align: "left",
},
{
name: "更新时间",
value: "arrivalInReceiptStatus",
value: "updateTime",
width: "",
align: "left",
},
......@@ -255,11 +200,7 @@ export default {
this.search(0);
this.calculateTableHeight();
},
watch: {
$route(val, oldval) {
this.popoverClose();
},
},
watch: {},
mounted() {
window.addEventListener("resize", this.calculateTableHeight);
......@@ -268,15 +209,6 @@ export default {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
// 运单号跳转
linkChange(record) {
const { billNo } = record.row;
console.log(record);
this.$router.push({
path: "/reportingData",
query: { billNo, search: true },
});
},
tableSelect(val) {
this.selected = val.selection;
},
......@@ -291,85 +223,17 @@ export default {
});
}
},
popoverClose(val) {
this.tableData.forEach((item) => {
item.listReceiptStatusPopoverType = false;
item.arrivalInReceiptStatusPopoverType = false;
item.popoverData = [];
});
this.selectedLogRow.allLogDataReceiptStatusPopoverType = false;
this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
"auto";
},
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
//查询回执
receiptApi(billNo, type) {
return new Promise((resolve, reject) => {
let obj = { billNo };
// if (type == "listReceiptStatus") {
// getListReceipt(obj)
// .then((res) => {
// if (res.code === "200") {
// resolve(res.data);
// } else {
// reject();
// }
// })
// .catch((err) => {
// console.log(err);
// reject();
// });
// } else
if (type == "arrivalInReceiptStatus") {
arrivalInReceipt(obj)
.then((res) => {
if (res.code === "200") {
resolve(res.data);
} else {
reject();
}
})
.catch((err) => {
console.log(err);
reject();
});
}
});
},
popoverChange(val) {
this.tableData = val.tableData;
console.log(val);
this.receiptApi(val.data.billNo, val.status)
.then((res) => {
val.tableData.forEach((item) => {
if (item.declareId == val.data.declareId) {
item.popoverData = res;
}
});
this.tableData = val.tableData;
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch("setLoadingState", false);
this.$refs.listReceiptStatusPopover.tableLoading = false; // 清单回执
this.$refs.arrivalInReceiptStatusPopover.tableLoading = false; //运抵单回执
});
});
},
clear() {
this.$refs.sreachForm.resetFields();
//重置数据
this.sreachFormData = {
billNo: "",
operatorCode: "",
operatorName: "",
receiptStatus: null,
receiptType: null,
skuCode: "",
skuname: "",
createTime: [],
};
},
......@@ -389,22 +253,17 @@ export default {
obj.startCreateTime = obj.createTime[0];
obj.endCreateTime = obj.createTime[1];
}
getArrivalIneList({
// isOnlySearchArrivalIn: true,
getHsCodeList({
...obj,
})
.then((res) => {
if (res.code === "200") {
this.tableData = res.data.value;
this.page.total = res.data.totalItems;
this.tableData.forEach((item, idx) => {
item.index = idx;
item.listReceiptStatusPopoverType = false; // 清单回执
item.arrivalInReceiptStatusPopoverType = false; // 运抵单回执
// item.logLoading = false;
item.popoverData = [];
this.tableData.map((item, index) => {
item.gnum = index + 1;
return item;
});
this.selectedLogRow.allLogDataReceiptStatusPopoverType = false;
} else {
this.alertWarningMsg(res.message);
}
......