|
@@ -36,6 +36,21 @@
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #isTransaction>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-radio-group v-model="formData.data.isTransaction" @change="changeIsTransaction">
|
|
|
+ <el-radio label="1" border>是</el-radio>
|
|
|
+ <el-radio label="0" border>否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #transactionDeptId>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-select v-model="formData.data.transactionDeptId" placeholder="请选择往来单位" style="width: 100%" clearable>
|
|
|
+ <el-option v-for="item in departmentList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
@@ -209,6 +224,8 @@ let dialogVisible = ref(false);
|
|
|
let rules = ref({
|
|
|
productClassifyId: [{ required: true, message: "请选择物料分类", trigger: "change" }],
|
|
|
type: [{ required: true, message: "请选择物料类型", trigger: "change" }],
|
|
|
+ isTransaction: [{ required: true, message: "请选择是否往来", trigger: "change" }],
|
|
|
+ transactionDeptId: [{ required: true, message: "请选择往来单位", trigger: "change" }],
|
|
|
});
|
|
|
const accountCurrency = ref([]);
|
|
|
const accountList = ref([]);
|
|
@@ -217,6 +234,7 @@ const deptTreeData = ref([]);
|
|
|
const userList = ref([]);
|
|
|
const fundsType = ref([]);
|
|
|
const fundsPaymentMethod = ref([]);
|
|
|
+const departmentList = ref([]);
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const selectConfig = computed(() => {
|
|
|
return [
|
|
@@ -484,6 +502,22 @@ const formConfig = computed(() => {
|
|
|
label: "打款时间",
|
|
|
format: "YYYY-MM-DD HH:mm:ss",
|
|
|
},
|
|
|
+ formData.data.type != "20"
|
|
|
+ ? {
|
|
|
+ type: "slot",
|
|
|
+ prop: "isTransaction",
|
|
|
+ slotName: "isTransaction",
|
|
|
+ label: "打款时间",
|
|
|
+ }
|
|
|
+ : {},
|
|
|
+ formData.data.type != "20" && formData.data.isTransaction === "1"
|
|
|
+ ? {
|
|
|
+ type: "slot",
|
|
|
+ prop: "transactionDeptId",
|
|
|
+ slotName: "transactionDeptId",
|
|
|
+ label: "往来单位",
|
|
|
+ }
|
|
|
+ : {},
|
|
|
{
|
|
|
type: "input",
|
|
|
prop: "remark",
|
|
@@ -598,6 +632,19 @@ const getDict = () => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ proxy.get("/transactionDepartment/list", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
+ if (res.data && res.data.length > 0) {
|
|
|
+ departmentList.value = res.data.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ departmentList.value = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
getDict();
|
|
|
const getList = async (req) => {
|
|
@@ -863,6 +910,9 @@ const printObj = ref({
|
|
|
extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
|
|
|
});
|
|
|
+const changeIsTransaction = () => {
|
|
|
+ formData.data.transactionDeptId = "";
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|