|
@@ -69,6 +69,14 @@
|
|
|
<EditPen />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="清零" placement="top" effect="light">
|
|
|
+ <el-icon
|
|
|
+ style="margin-left: 10px; transform: translateY(2px); color: #409eff; cursor: pointer"
|
|
|
+ @click="clickRefresh(index, 'customProcessingFee')"
|
|
|
+ v-if="route.query && route.query.detailId">
|
|
|
+ <Refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="line-height: 35px">
|
|
|
<span style="color: black; font-weight: 700">代发费: </span>
|
|
@@ -81,6 +89,14 @@
|
|
|
<EditPen />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="清零" placement="top" effect="light">
|
|
|
+ <el-icon
|
|
|
+ style="margin-left: 10px; transform: translateY(2px); color: #409eff; cursor: pointer"
|
|
|
+ @click="clickRefresh(index, 'lssueFee')"
|
|
|
+ v-if="route.query && route.query.detailId">
|
|
|
+ <Refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="line-height: 35px">
|
|
|
<span style="color: black; font-weight: 700">快递包材费: </span>
|
|
@@ -93,6 +109,14 @@
|
|
|
<EditPen />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="清零" placement="top" effect="light">
|
|
|
+ <el-icon
|
|
|
+ style="margin-left: 10px; transform: translateY(2px); color: #409eff; cursor: pointer"
|
|
|
+ @click="clickRefresh(index, 'deliveryMaterialsFee')"
|
|
|
+ v-if="route.query && route.query.detailId">
|
|
|
+ <Refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="line-height: 35px">
|
|
|
<span style="color: black; font-weight: 700">包装人工费: </span>
|
|
@@ -105,6 +129,14 @@
|
|
|
<EditPen />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="清零" placement="top" effect="light">
|
|
|
+ <el-icon
|
|
|
+ style="margin-left: 10px; transform: translateY(2px); color: #409eff; cursor: pointer"
|
|
|
+ @click="clickRefresh(index, 'packingLabor')"
|
|
|
+ v-if="route.query && route.query.detailId">
|
|
|
+ <Refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="line-height: 35px">
|
|
|
<span style="color: black; font-weight: 700">管理费: </span>
|
|
@@ -117,6 +149,14 @@
|
|
|
<EditPen />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="清零" placement="top" effect="light">
|
|
|
+ <el-icon
|
|
|
+ style="margin-left: 10px; transform: translateY(2px); color: #409eff; cursor: pointer"
|
|
|
+ @click="clickRefresh(index, 'managementFee')"
|
|
|
+ v-if="route.query && route.query.detailId">
|
|
|
+ <Refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="line-height: 35px">
|
|
|
<span style="color: black; font-weight: 700">单价: </span>
|
|
@@ -129,6 +169,14 @@
|
|
|
<EditPen />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="清零" placement="top" effect="light">
|
|
|
+ <el-icon
|
|
|
+ style="margin-left: 10px; transform: translateY(2px); color: #409eff; cursor: pointer"
|
|
|
+ @click="clickRefresh(index, 'unitPrice')"
|
|
|
+ v-if="route.query && route.query.detailId">
|
|
|
+ <Refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="line-height: 35px">
|
|
|
<span style="color: black; font-weight: 700">小计: </span>
|
|
@@ -203,6 +251,14 @@
|
|
|
<EditPen />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="清零" placement="top" effect="light">
|
|
|
+ <el-icon
|
|
|
+ style="margin-left: 10px; transform: translateY(2px); color: #409eff; cursor: pointer"
|
|
|
+ @click="clickBomPriceRefresh(index, props.$index, 'unitPrice')"
|
|
|
+ v-if="route.query && route.query.detailId">
|
|
|
+ <Refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -645,6 +701,54 @@ const clickChangePrice = (item, index, label, text) => {
|
|
|
textPrice.value = text;
|
|
|
openChangePrice.value = true;
|
|
|
};
|
|
|
+const clickRefresh = (index, label) => {
|
|
|
+ formData.data.orderSkuList[index][label] = 0;
|
|
|
+ if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
|
|
|
+ for (let i = 0; i < formData.data.orderSkuList.length; i++) {
|
|
|
+ let packagingMaterialCost = 0;
|
|
|
+ if (formData.data.orderSkuList[i].quantity) {
|
|
|
+ if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
|
|
|
+ for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
|
|
|
+ if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
|
|
|
+ packagingMaterialCost = Number(
|
|
|
+ Math.round(
|
|
|
+ (packagingMaterialCost +
|
|
|
+ formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
|
|
|
+ 100
|
|
|
+ ) / 100
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formData.data.productTotalAmount = calculatedAmount("unitPrice");
|
|
|
+ formData.data.customProcessingFee = calculatedAmount("customProcessingFee");
|
|
|
+ formData.data.lssueFee = calculatedAmount("lssueFee");
|
|
|
+ formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
|
|
|
+ formData.data.packingLabor = calculatedAmount("packingLabor");
|
|
|
+ formData.data.managementFee = calculatedAmount("managementFee");
|
|
|
+ formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
|
|
|
+ formData.data.totalAmount = calculatedTotalAmount();
|
|
|
+ if (fileList.value && fileList.value.length > 0) {
|
|
|
+ formData.data.fileList = fileList.value.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.raw.id,
|
|
|
+ fileName: item.raw.fileName,
|
|
|
+ fileUrl: item.raw.fileUrl,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ formData.data.fileList = [];
|
|
|
+ }
|
|
|
+ proxy.post("/orderInfo/edit", formData.data).then(() => {
|
|
|
+ ElMessage({ message: "修改完成", type: "success" });
|
|
|
+ openChangePrice.value = false;
|
|
|
+ getOrderDetail({ id: route.query.id || route.query.detailId });
|
|
|
+ });
|
|
|
+};
|
|
|
const submitChangePrice = () => {
|
|
|
proxy.$refs.price.validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -760,6 +864,53 @@ const clickChangeBomPrice = (index, item, indexBOM, label, text) => {
|
|
|
textPrice.value = text;
|
|
|
openChangePrice.value = true;
|
|
|
};
|
|
|
+const clickBomPriceRefresh = (index, indexBOM, label) => {
|
|
|
+ formData.data.orderSkuList[index].orderSkuBomList[indexBOM][label] = 0;
|
|
|
+ if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
|
|
|
+ for (let i = 0; i < formData.data.orderSkuList.length; i++) {
|
|
|
+ let packagingMaterialCost = 0;
|
|
|
+ if (formData.data.orderSkuList[i].quantity) {
|
|
|
+ if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
|
|
|
+ for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
|
|
|
+ if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
|
|
|
+ packagingMaterialCost = Number(
|
|
|
+ Math.round(
|
|
|
+ (packagingMaterialCost +
|
|
|
+ formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
|
|
|
+ 100
|
|
|
+ ) / 100
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formData.data.productTotalAmount = calculatedAmount("unitPrice");
|
|
|
+ formData.data.customProcessingFee = calculatedAmount("customProcessingFee");
|
|
|
+ formData.data.lssueFee = calculatedAmount("lssueFee");
|
|
|
+ formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
|
|
|
+ formData.data.packingLabor = calculatedAmount("packingLabor");
|
|
|
+ formData.data.managementFee = calculatedAmount("managementFee");
|
|
|
+ formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
|
|
|
+ formData.data.totalAmount = calculatedTotalAmount();
|
|
|
+ if (fileList.value && fileList.value.length > 0) {
|
|
|
+ formData.data.fileList = fileList.value.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.raw.id,
|
|
|
+ fileName: item.raw.fileName,
|
|
|
+ fileUrl: item.raw.fileUrl,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ formData.data.fileList = [];
|
|
|
+ }
|
|
|
+ proxy.post("/orderInfo/edit", formData.data).then(() => {
|
|
|
+ ElMessage({ message: "修改完成", type: "success" });
|
|
|
+ getOrderDetail({ id: route.query.id || route.query.detailId });
|
|
|
+ });
|
|
|
+};
|
|
|
const changeProcessingType = () => {
|
|
|
changePrice.data[labelPrice.value] = 0;
|
|
|
};
|