|
@@ -123,7 +123,8 @@
|
|
|
<el-form-item :prop="'costControlDetailList.' + $index + '.accountPeriodAmountTax'" :rules="rules.accountPeriodAmountTax"
|
|
|
:inline-message="true" class="margin-b-0">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.accountPeriodAmountTax" placeholder="请输入" style="width: 100%"
|
|
|
- :precision="2" :controls="false" :min="0" disabled />
|
|
|
+ :precision="2" :controls="false" :min="0"
|
|
|
+ @change="(val)=>handleChangeMoney(val,$index,'accountPeriodAmountTax')" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -132,7 +133,7 @@
|
|
|
<el-form-item :prop="'costControlDetailList.' + $index + '.accountPeriodAmount'" :rules="rules.accountPeriodAmount"
|
|
|
:inline-message="true" class="margin-b-0">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.accountPeriodAmount" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" disabled />
|
|
|
+ :controls="false" :min="0" @change="(val)=>handleChangeMoney(val,$index,'accountPeriodAmount')" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -150,7 +151,7 @@
|
|
|
<el-form-item :prop="'costControlDetailList.' + $index + '.deductionPrepaidTax'" :rules="rules.deductionPrepaidTax"
|
|
|
:inline-message="true" class="margin-b-0">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.deductionPrepaidTax" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" />
|
|
|
+ :controls="false" :min="0" @change="(val)=>handleChangeMoney(val,$index,'deductionPrepaidTax')" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -159,7 +160,7 @@
|
|
|
<el-form-item :prop="'costControlDetailList.' + $index + '.deductionPrepaid'" :rules="rules.deductionPrepaid" :inline-message="true"
|
|
|
class="margin-b-0">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.deductionPrepaid" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" />
|
|
|
+ :controls="false" :min="0" @change="(val)=>handleChangeMoney(val,$index,'deductionPrepaid')" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -299,7 +300,7 @@
|
|
|
<el-form-item :prop="'costControlDetailList.' + $index + '.currentPayable'" :rules="rules.currentPayable" :inline-message="true"
|
|
|
class="margin-b-0">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.currentPayable" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" @change="handleGetRemark($index)" />
|
|
|
+ :controls="false" :min="0" @change="handleGetRemark($index)" :disabled="getCurrentPayableDisabled" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -472,7 +473,7 @@ const formConfig = computed(() => {
|
|
|
prop: "costType",
|
|
|
itemWidth: 25,
|
|
|
data: paymentTypeData.value,
|
|
|
- // clearable: true,
|
|
|
+ disabled: isDisabled.value,
|
|
|
fn: (val) => {
|
|
|
changeCostType(val);
|
|
|
},
|
|
@@ -500,7 +501,6 @@ const formConfig = computed(() => {
|
|
|
itemType: "date",
|
|
|
prop: "applyTime",
|
|
|
label: "申请日期",
|
|
|
- disabled: false,
|
|
|
itemWidth: 25,
|
|
|
isShow: isShowAtt("applyTime", "mainObj"),
|
|
|
disabled: true,
|
|
@@ -519,6 +519,7 @@ const formConfig = computed(() => {
|
|
|
label: "快递公司",
|
|
|
prop: "logisticsCompanyId",
|
|
|
itemWidth: 25,
|
|
|
+ disabled: isDisabled.value,
|
|
|
data: logisticsCompanyData.value,
|
|
|
isShow: isShowAtt("logisticsCompanyId", "mainObj"),
|
|
|
},
|
|
@@ -527,7 +528,7 @@ const formConfig = computed(() => {
|
|
|
prop: "invoiceTaxPoint",
|
|
|
label: "开票税点",
|
|
|
itemType: "text",
|
|
|
- disabled: false,
|
|
|
+ disabled: isDisabled.value,
|
|
|
itemWidth: 25,
|
|
|
isShow: isShowAtt("invoiceTaxPoint", "mainObj"),
|
|
|
},
|
|
@@ -538,6 +539,7 @@ const formConfig = computed(() => {
|
|
|
prop: "isVoucher",
|
|
|
itemWidth: 25,
|
|
|
data: isAfterSubmit.value,
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: isShowAtt("isVoucher", "mainObj"),
|
|
|
},
|
|
|
{
|
|
@@ -568,6 +570,7 @@ const formConfig = computed(() => {
|
|
|
// getDeptData(val);
|
|
|
// },
|
|
|
multiple: true,
|
|
|
+ disabled: true,
|
|
|
isShow:
|
|
|
isShowAtt("companyId", "mainObj") &&
|
|
|
currentCostTypeData.value.name == "采购货款",
|
|
@@ -595,7 +598,7 @@ const formConfig = computed(() => {
|
|
|
fn: (val) => {
|
|
|
changApplyUserId(val);
|
|
|
},
|
|
|
- // disabled: true,
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: isShowAtt("applyUserId", "mainObj"),
|
|
|
},
|
|
|
{
|
|
@@ -622,6 +625,7 @@ const formConfig = computed(() => {
|
|
|
prop: "isPublicTransfer",
|
|
|
itemWidth: 25,
|
|
|
data: isAfterSubmit.value,
|
|
|
+ disabled: isDisabled.value,
|
|
|
fn: (val) => {
|
|
|
formData.data.paymentAccountId = "";
|
|
|
formData.data.paymentAccountName = "";
|
|
@@ -642,18 +646,7 @@ const formConfig = computed(() => {
|
|
|
};
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
- if (
|
|
|
- currentCostTypeData.value &&
|
|
|
- currentCostTypeData.value.name.indexOf("快递") != -1
|
|
|
- ) {
|
|
|
- for (let i = 0; i < formData.data.costControlDetailList.length; i++) {
|
|
|
- const row = formData.data.costControlDetailList[i];
|
|
|
- row.currentPayable =
|
|
|
- val == "1" ? row.currentPrepaidTax : row.currentPrepaid;
|
|
|
- handleGetRemark(i);
|
|
|
- }
|
|
|
- }
|
|
|
+ changeIsPublicTransfer(val);
|
|
|
},
|
|
|
isShow: isShowAtt("isPublicTransfer", "mainObj"),
|
|
|
},
|
|
@@ -663,6 +656,7 @@ const formConfig = computed(() => {
|
|
|
prop: "paymentMethod",
|
|
|
itemWidth: 25,
|
|
|
data: paymentMethod.value,
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: isShowAtt("paymentMethod", "mainObj"),
|
|
|
fn: (val) => {
|
|
|
if (
|
|
@@ -694,6 +688,7 @@ const formConfig = computed(() => {
|
|
|
fn: (val) => {
|
|
|
changeShroffAccount(val);
|
|
|
},
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: isShowAtt("paymentAccountId", "mainObj"),
|
|
|
},
|
|
|
{
|
|
@@ -702,6 +697,7 @@ const formConfig = computed(() => {
|
|
|
label: "开户行",
|
|
|
placeholder: "请输入开户行",
|
|
|
itemWidth: 25,
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: isShowAtt("paymentAccountId", "mainObj"),
|
|
|
},
|
|
|
{
|
|
@@ -710,6 +706,7 @@ const formConfig = computed(() => {
|
|
|
label: "开户名",
|
|
|
placeholder: "请输入开户名",
|
|
|
itemWidth: 25,
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: isShowAtt("paymentAccountId", "mainObj"),
|
|
|
},
|
|
|
{
|
|
@@ -718,6 +715,7 @@ const formConfig = computed(() => {
|
|
|
label: "账号",
|
|
|
placeholder: "请输入账号",
|
|
|
itemWidth: 25,
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: isShowAtt("paymentAccountId", "mainObj"),
|
|
|
},
|
|
|
{
|
|
@@ -732,7 +730,7 @@ const formConfig = computed(() => {
|
|
|
label: "开户行",
|
|
|
placeholder: "请输入开户行",
|
|
|
itemWidth: 25,
|
|
|
- // isShow: isShowAtt("accountBank", "mainObj"),
|
|
|
+ disabled: isDisabled.value,
|
|
|
isShow: getIsShowData("accountBank"),
|
|
|
},
|
|
|
{
|
|
@@ -741,6 +739,7 @@ const formConfig = computed(() => {
|
|
|
label: "开户名",
|
|
|
placeholder: "请输入开户名",
|
|
|
itemWidth: 25,
|
|
|
+ disabled: isDisabled.value,
|
|
|
// isShow: isShowAtt("accountName", "mainObj"),
|
|
|
isShow: getIsShowData("accountName"),
|
|
|
},
|
|
@@ -750,6 +749,7 @@ const formConfig = computed(() => {
|
|
|
label: "账号",
|
|
|
placeholder: "请输入账号",
|
|
|
itemWidth: 25,
|
|
|
+ disabled: isDisabled.value,
|
|
|
// isShow: isShowAtt("accountNumber", "mainObj"),
|
|
|
isShow: getIsShowData("accountNumber"),
|
|
|
},
|
|
@@ -960,9 +960,18 @@ const getDeptData = (val) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const getCurrentPayableDisabled = ref(false);
|
|
|
const changeCostType = (val) => {
|
|
|
currentCostTypeData.value = paymentTypeData.value.find((x) => x.value == val);
|
|
|
formData.data.tradeType = currentCostTypeData.value.tradeType;
|
|
|
+ if (
|
|
|
+ currentCostTypeData.value.name.indexOf("备用金申请") != -1 ||
|
|
|
+ currentCostTypeData.value.name.indexOf("借款") != -1
|
|
|
+ ) {
|
|
|
+ getCurrentPayableDisabled.value = false;
|
|
|
+ } else {
|
|
|
+ getCurrentPayableDisabled.value = true;
|
|
|
+ }
|
|
|
if (formData.data && formData.data.applyUserId) {
|
|
|
changApplyUserId(formData.data.applyUserId);
|
|
|
}
|
|
@@ -995,14 +1004,180 @@ const changeCostType = (val) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const changeIsPublicTransfer = (val) => {
|
|
|
+ if (
|
|
|
+ currentCostTypeData.value &&
|
|
|
+ currentCostTypeData.value.name.indexOf("快递费充值") != -1
|
|
|
+ ) {
|
|
|
+ for (let i = 0; i < formData.data.costControlDetailList.length; i++) {
|
|
|
+ const row = formData.data.costControlDetailList[i];
|
|
|
+ row.currentPayable =
|
|
|
+ val == "1" ? row.currentPrepaidTax : row.currentPrepaid;
|
|
|
+ handleGetRemark(i);
|
|
|
+ }
|
|
|
+ } else if (
|
|
|
+ currentCostTypeData.value &&
|
|
|
+ currentCostTypeData.value.name.indexOf("快递费付款") != -1
|
|
|
+ ) {
|
|
|
+ for (let i = 0; i < formData.data.costControlDetailList.length; i++) {
|
|
|
+ const row = formData.data.costControlDetailList[i];
|
|
|
+ row.currentPayable =
|
|
|
+ val == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmountTax - row.deductionPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmount - row.deductionPrepaid
|
|
|
+ ).toFixed(2)
|
|
|
+ );
|
|
|
+ handleGetRemark(i);
|
|
|
+ }
|
|
|
+ } else if (
|
|
|
+ currentCostTypeData.value &&
|
|
|
+ currentCostTypeData.value.name.indexOf("采购货款") != -1
|
|
|
+ ) {
|
|
|
+ for (let i = 0; i < formData.data.costControlDetailList.length; i++) {
|
|
|
+ const row = formData.data.costControlDetailList[i];
|
|
|
+ if (formData.data.isAdvance == "1") {
|
|
|
+ row.currentPayable =
|
|
|
+ val == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ row.currentPayable =
|
|
|
+ val == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmountTax - row.deductionPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmountTax - row.deductionPrepaid
|
|
|
+ ).toFixed(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ handleGetRemark(i);
|
|
|
+ }
|
|
|
+ } else if (
|
|
|
+ currentCostTypeData.value &&
|
|
|
+ currentCostTypeData.value.name.indexOf("其他费用") != -1
|
|
|
+ ) {
|
|
|
+ for (let i = 0; i < formData.data.costControlDetailList.length; i++) {
|
|
|
+ const row = formData.data.costControlDetailList[i];
|
|
|
+ if (formData.data.isAdvance == "1") {
|
|
|
+ row.currentPayable =
|
|
|
+ val == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ row.currentPayable =
|
|
|
+ val == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.balancePrepaidTax - row.deductionPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(row.balancePrepaid - row.deductionPrepaid).toFixed(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ handleGetRemark(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const handleChangeMoney = (val, index, att) => {
|
|
|
let row = formData.data.costControlDetailList[index];
|
|
|
if (formData.data.isPublicTransfer) {
|
|
|
- if (formData.data.isPublicTransfer == "1") {
|
|
|
- row.currentPayable = row.currentPrepaidTax;
|
|
|
- } else if (formData.data.isPublicTransfer == "0") {
|
|
|
- row.currentPayable = row.currentPrepaid;
|
|
|
+ // 快递费充值 应付取对应的含税和不含税
|
|
|
+ if (currentCostTypeData.value.name.indexOf("快递费充值") != -1) {
|
|
|
+ row.currentPayable =
|
|
|
+ formData.data.isPublicTransfer == "1"
|
|
|
+ ? row.currentPrepaidTax
|
|
|
+ : row.currentPrepaid;
|
|
|
+ } else if (currentCostTypeData.value.name.indexOf("快递费付款") != -1) {
|
|
|
+ row.currentPayable =
|
|
|
+ formData.data.isPublicTransfer == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmountTax - row.deductionPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmount - row.deductionPrepaid
|
|
|
+ ).toFixed(2)
|
|
|
+ );
|
|
|
+ } else if (currentCostTypeData.value.name.indexOf("采购货款") != -1) {
|
|
|
+ // 是否预付
|
|
|
+ if (formData.data.isAdvance == "1") {
|
|
|
+ row.currentPayable =
|
|
|
+ formData.data.isPublicTransfer == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ row.currentPayable =
|
|
|
+ formData.data.isPublicTransfer == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmountTax - row.deductionPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(
|
|
|
+ row.accountPeriodAmountTax - row.deductionPrepaid
|
|
|
+ ).toFixed(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else if (currentCostTypeData.value.name.indexOf("其他费用") != -1) {
|
|
|
+ // 是否预付
|
|
|
+ if (formData.data.isAdvance == "1") {
|
|
|
+ row.currentPayable =
|
|
|
+ formData.data.isPublicTransfer == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ row.currentPayable =
|
|
|
+ formData.data.isPublicTransfer == "1"
|
|
|
+ ? Number(
|
|
|
+ parseFloat(
|
|
|
+ row.balancePrepaidTax - row.deductionPrepaidTax
|
|
|
+ ).toFixed(2)
|
|
|
+ )
|
|
|
+ : Number(
|
|
|
+ parseFloat(row.balancePrepaid - row.deductionPrepaid).toFixed(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
handleGetRemark(index);
|
|
|
}
|
|
|
};
|
|
@@ -1259,6 +1434,7 @@ const clickAdd = () => {
|
|
|
taxation: null,
|
|
|
fileList: [],
|
|
|
invoiceFileList: [],
|
|
|
+ labelName: "",
|
|
|
});
|
|
|
} else {
|
|
|
formData.data.costControlDetailList = [
|
|
@@ -1292,6 +1468,7 @@ const clickAdd = () => {
|
|
|
taxation: null,
|
|
|
fileList: [],
|
|
|
invoiceFileList: [],
|
|
|
+ labelName: "",
|
|
|
},
|
|
|
];
|
|
|
}
|
|
@@ -1462,10 +1639,12 @@ const getAllData = (businessId) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const isDisabled = ref(false);
|
|
|
onMounted(() => {
|
|
|
formData.data.companyIdSet.push(proxy.useUserStore().user.companyId);
|
|
|
getDeptData(formData.data.companyId);
|
|
|
- formOption.disabled = judgeStatus();
|
|
|
+ isDisabled.value = judgeStatus();
|
|
|
+ // formOption.disabled = judgeStatus();
|
|
|
if (route.query && route.query.businessId && route.query.processType) {
|
|
|
let businessId = route.query.businessId;
|
|
|
getAllData(businessId);
|