|
@@ -71,6 +71,13 @@ const config = computed(() => {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
|
|
+ label: "业务公司",
|
|
|
|
+ prop: "companyName",
|
|
|
|
+ width: 110,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ attrs: {
|
|
label: "供应商",
|
|
label: "供应商",
|
|
prop: "supplyName",
|
|
prop: "supplyName",
|
|
width: 250,
|
|
width: 250,
|
|
@@ -113,50 +120,52 @@ const config = computed(() => {
|
|
align: "center",
|
|
align: "center",
|
|
},
|
|
},
|
|
renderHTML(row) {
|
|
renderHTML(row) {
|
|
- return [
|
|
|
|
- {
|
|
|
|
- attrs: {
|
|
|
|
- label: "修改",
|
|
|
|
- type: "primary",
|
|
|
|
- text: true,
|
|
|
|
- },
|
|
|
|
- el: "button",
|
|
|
|
- click() {
|
|
|
|
- update(row);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- attrs: {
|
|
|
|
- label: "删除",
|
|
|
|
- type: "primary",
|
|
|
|
- text: true,
|
|
|
|
- },
|
|
|
|
- el: "button",
|
|
|
|
- click() {
|
|
|
|
- ElMessageBox.confirm(
|
|
|
|
- "此操作将永久删除该数据, 是否继续?",
|
|
|
|
- "提示",
|
|
|
|
- {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning",
|
|
|
|
- }
|
|
|
|
- ).then(() => {
|
|
|
|
- proxy
|
|
|
|
- .post("/invoice/delete", {
|
|
|
|
- id: row.id,
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- ElMessage({
|
|
|
|
- message: "删除成功",
|
|
|
|
- type: "success",
|
|
|
|
- });
|
|
|
|
- getList();
|
|
|
|
|
|
+ return proxy.isCurrentCompanyData(row.companyId)
|
|
|
|
+ ? [
|
|
|
|
+ {
|
|
|
|
+ attrs: {
|
|
|
|
+ label: "修改",
|
|
|
|
+ type: "primary",
|
|
|
|
+ text: true,
|
|
|
|
+ },
|
|
|
|
+ el: "button",
|
|
|
|
+ click() {
|
|
|
|
+ update(row);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ attrs: {
|
|
|
|
+ label: "删除",
|
|
|
|
+ type: "primary",
|
|
|
|
+ text: true,
|
|
|
|
+ },
|
|
|
|
+ el: "button",
|
|
|
|
+ click() {
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
+ "此操作将永久删除该数据, 是否继续?",
|
|
|
|
+ "提示",
|
|
|
|
+ {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ }
|
|
|
|
+ ).then(() => {
|
|
|
|
+ proxy
|
|
|
|
+ .post("/invoice/delete", {
|
|
|
|
+ id: row.id,
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: "删除成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ getList();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
- });
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ : [];
|
|
},
|
|
},
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -219,6 +228,15 @@ const formOption = reactive({
|
|
const formConfig = computed(() => {
|
|
const formConfig = computed(() => {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
|
|
+ type: "treeSelect",
|
|
|
|
+ prop: "companyId",
|
|
|
|
+ label: "业务公司",
|
|
|
|
+ data: proxy.useUserStore().allDict["tree_company_data"],
|
|
|
|
+ propsTreeLabel: "deptName",
|
|
|
|
+ propsTreeValue: "deptId",
|
|
|
|
+ itemWidth: 50,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
type: "select",
|
|
type: "select",
|
|
label: "供应商",
|
|
label: "供应商",
|
|
prop: "supplyId",
|
|
prop: "supplyId",
|
|
@@ -264,6 +282,7 @@ const rules = ref({
|
|
supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
|
|
supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
|
|
type: [{ required: true, message: "请选择发票类型", trigger: "change" }],
|
|
type: [{ required: true, message: "请选择发票类型", trigger: "change" }],
|
|
money: [{ required: true, message: "请输入金额", trigger: "blur" }],
|
|
money: [{ required: true, message: "请输入金额", trigger: "blur" }],
|
|
|
|
+ companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
|
|
});
|
|
});
|
|
const formData = reactive({
|
|
const formData = reactive({
|
|
data: {
|
|
data: {
|