jinhui.wang

参数修改,逻辑修正

......@@ -148,8 +148,10 @@
<div v-else-if="item.prop == 'recipientContactName'">
<span
v-if="
scope.row.userUuid == $store.getters.userData.userUuid &&
scope.row.shipperAccount == $store.getters.userData.accountNo
scope.row.userUuid == $store.getters.userData.userUuid ||
scope.row.shipperAccount == $store.getters.userData.accountNo ||
scope.row.userInputShipperAccount ==
$store.getters.userData.accountNo
"
>{{ scope.row.recipientContactName }}</span
>
......@@ -157,8 +159,10 @@
<div v-else-if="item.prop == 'recipientCompany'">
<span
v-if="
scope.row.userUuid == $store.getters.userData.userUuid &&
scope.row.shipperAccount == $store.getters.userData.accountNo
scope.row.userUuid == $store.getters.userData.userUuid ||
scope.row.shipperAccount == $store.getters.userData.accountNo ||
scope.row.userInputShipperAccount ==
$store.getters.userData.accountNo
"
>{{ scope.row.recipientCompany }}</span
>
......@@ -166,8 +170,10 @@
<div v-else-if="item.prop == 'shipperCountry'">
<span
v-if="
scope.row.uuid == $store.getters.userData.userUuid &&
scope.row.shipperAccount == $store.getters.userData.accountNo
scope.row.userUuid == $store.getters.userData.userUuid ||
scope.row.shipperAccount == $store.getters.userData.accountNo ||
scope.row.userInputShipperAccount ==
$store.getters.userData.accountNo
"
>{{ scope.row.shipperCountry }}</span
>
......
......@@ -8,6 +8,7 @@
:close-on-click-modal="false"
center
v-loading="loadings.dialogLoading"
@close="closeDialog"
>
<div class="dialogContent">
<div class="dialogTitle">
......@@ -52,7 +53,7 @@
:key="idx"
>
<div class="filtItemData-name">
<i class="el-icon-document" />{{ file.fileName }}
<i class="el-icon-document" />{{ file.sourceFileName }}
</div>
<div class="filtItemData-option">
<span>{{ file.fileSize }}</span>
......@@ -185,7 +186,7 @@ export default {
dialogLoading: false,
tableLoading: false,
},
tableMaxheight: 300,
tableMaxheight: 700,
};
},
watch: {
......@@ -280,7 +281,20 @@ export default {
this.closeDialog(data, "copy");
},
viewFile(val) {},
downloadFile(val) {},
downloadFile(val) {
this.zipdownload
.downLoadZip(
"biz-customer/attachment/downLoadFile",
{
name: val.fileName,
path: val.filePath,
},
val.sourceFileName
)
.then((res) => {
console.log(res);
});
},
expandChange(val) {
let total = 0;
val.files.forEach((item) => {
......
......@@ -13,8 +13,8 @@
v-if="
headData.id == null ||
headData.id == '0' ||
(headData.userUuid != $store.getters.userData.userUuid &&
headData.shipperAccount != $store.getters.userData.accountNo)
((headData.userUuid == null || headData.userUuid == '') &&
(headData.createUserId == null || createUserId == ''))
"
>
<div class="formRowTitle">
......@@ -609,11 +609,9 @@ export default {
let reg = /[^\d]/;
if (value.length != 9 && value.length != 12) {
callback("TRACKING NUMBER需为12位!");
}
// else if (reg.test(value)) {
// callback("TRACKING NUMBER需为数字!");
// }
else {
} else if (reg.test(value)) {
callback("TRACKING NUMBER需为数字!");
} else {
callback();
}
} else {
......@@ -745,7 +743,7 @@ export default {
if (blurType == "code") {
this.formItemDisableType(
[true, false, false],
val.consignmentId,
val.consignment,
blurType
);
this.oldData.consignmentCode = this.headData.consignmentCode;
......@@ -758,7 +756,7 @@ export default {
) {
this.formItemDisableType(
[true, true, true],
val.consignmentId,
val.consignment,
blurType
);
} else {
......@@ -769,7 +767,7 @@ export default {
).then(() => {
this.formItemDisableType(
[true, true, true],
val.consignmentId,
val.consignment,
blurType
);
});
......@@ -783,13 +781,13 @@ export default {
if (val.message != null && val.message != "") {
this.tipStatus = 1;
this.tipcontent = val.message;
this.tipOpen(val.consignmentId, blurType, 1);
this.tipOpen(val.consignment, blurType, 1);
} else {
headData.id = val.consignmentId;
headData = val.consignment;
this.$emit("searchWaybillData", headData);
}
} else if (blurType == "account") {
headData.id = val.consignmentId;
headData = val.consignment;
this.$emit("searchWaybillData", headData);
}
} else if (val.isCreatorFlag == 2) {
......@@ -798,11 +796,11 @@ export default {
if (blurType == "code") {
this.tipStatus = 2;
this.tipcontent = val.message;
this.tipOpen(val.consignmentId, blurType, 2);
this.tipOpen(val.consignment, blurType, 2);
} else if (blurType == "account") {
this.formItemDisableType(
[true, true, true],
val.consignmentId,
val.consignment,
blurType
);
}
......@@ -822,7 +820,7 @@ export default {
setTimeout(() => {
if (res.code === 200) {
res.data.message = res.msg;
this.oldData.id = res.data.consignmentId;
this.oldData.id = res.data.consignment.id;
resolve(res);
} else {
this.msgWarning(res.msg);
......@@ -838,7 +836,7 @@ export default {
});
});
},
formItemDisableType(typeList, id, blurType) {
formItemDisableType(typeList, data, blurType) {
let key = ["userInputShipperAccount", "userInputOriginCountryCode"];
key.forEach((item, idx) => {
this.rules[item][0].required = typeList[idx];
......
......@@ -11,8 +11,8 @@
id != '' &&
id != null &&
id != '0' &&
(headData.userUuid == $store.getters.userData.userUuid ||
headData.shipperAccount == $store.getters.userData.accountNo)
(headData.userUuid == null || headData.userUuid == '') &&
(headData.createUserId == null || createUserId == '')
"
>:{{ headData.consignmentCode }}</span
>
......@@ -351,9 +351,12 @@ export default {
this.headData.shipperAddrLine = shipperAdd;
},
searchWaybillData(val) {
if (val.id != null && val.id != "") {
if (val != null && val != "") {
this.id = val.id;
this.searchhData();
this.headDisabled = true;
// this.searchhData();
this.headData = val;
this.searchFileData();
}
},
fileDataChange(val) {
......
......@@ -63,7 +63,7 @@
:key="idx"
>
<div class="fileName">
<i class="el-icon-document" />{{ file.fileName }}
<i class="el-icon-document" />{{ file.sourceFileName }}
</div>
<div class="fileOption">
<!-- 文件大小 -->
......@@ -173,7 +173,7 @@ export default {
fileSum = Number(fileSum) + Number(item.files.length);
item.files.forEach((file) => {
fileSize = Number(fileSize) + Number(file.fileSize);
fileNameArray.push(file.fileName);
fileNameArray.push(file.sourceFileName);
});
});
if (fileSum + 1 > 100) {
......@@ -194,7 +194,7 @@ export default {
id: null,
bizId: null,
bizTypeName: null,
sourceFileName: null,
sourceFileName: val.file.name,
filePath: null,
fileTypeCode: null,
fileTypeName: this.fileFormData.uploadType,
......@@ -224,7 +224,7 @@ export default {
obj.file = e.target.result;
arr.forEach((item, index) => {
if (item.uploadType == this.fileFormData.uploadType) {
obj.index = index;
obj.index = item.files.length == 0 ? 0 : item.files.length - 1;
item.files.push(obj);
}
});
......@@ -236,7 +236,7 @@ export default {
if (val.file.split(";base64,").length > 1) {
const aLink = document.createElement("a");
aLink.href = val.file;
aLink.setAttribute("download", val.fileName); // 设置下载文件名称
aLink.setAttribute("download", val.sourceFileName); // 设置下载文件名称
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
......@@ -248,7 +248,7 @@ export default {
name: val.fileName,
path: val.filePath,
},
val.fileName
val.sourceFileName
)
.then((res) => {
console.log(res);
......