|
@@ -447,7 +447,6 @@
|
|
|
|
|
|
<script setup>
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
-import useUserStore from "@/store/modules/user";
|
|
|
import SelectGoods from "@/components/product/SelectGoods";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import Editor from "@/components/Editor/index.vue";
|
|
@@ -573,91 +572,28 @@ const rules = ref({
|
|
|
remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
|
|
|
});
|
|
|
const getDict = () => {
|
|
|
- proxy
|
|
|
- .post("/dictTenantData/page", {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 999,
|
|
|
- dictCode: "contract_type",
|
|
|
- tenantId: useUserStore().user.tenantId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.rows && res.rows.length > 0) {
|
|
|
- contractType.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy
|
|
|
- .post("/dictTenantData/page", {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 999,
|
|
|
- dictCode: "account_currency",
|
|
|
- tenantId: useUserStore().user.tenantId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.rows && res.rows.length > 0) {
|
|
|
- accountCurrency.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy
|
|
|
- .post("/dictTenantData/page", {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 999,
|
|
|
- dictCode: "funds_payment_method",
|
|
|
- tenantId: useUserStore().user.tenantId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.rows && res.rows.length > 0) {
|
|
|
- fundsPaymentMethod.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy
|
|
|
- .post("/dictTenantData/page", {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 999,
|
|
|
- dictCode: "trade_methods",
|
|
|
- tenantId: useUserStore().user.tenantId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.rows && res.rows.length > 0) {
|
|
|
- tradeMethods.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy
|
|
|
- .post("/dictTenantData/page", {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 999,
|
|
|
- dictCode: "shipping_method",
|
|
|
- tenantId: useUserStore().user.tenantId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.rows && res.rows.length > 0) {
|
|
|
- shippingMethod.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ proxy.getDictOne(["account_currency", "funds_payment_method", "trade_methods", "shipping_method", "contract_type"]).then((res) => {
|
|
|
+ accountCurrency.value = res["account_currency"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ tradeMethods.value = res["trade_methods"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ shippingMethod.value = res["shipping_method"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ contractType.value = res["contract_type"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
templateList.value = res.rows.map((item) => {
|
|
|
return {
|