|
@@ -678,6 +678,52 @@ const rulesTwo = {
|
|
],
|
|
],
|
|
remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
|
|
remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
|
|
};
|
|
};
|
|
|
|
+const getProduct = () => {
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
+ proxy
|
|
|
|
+ .post("productInfo/getConditionProductList", {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 9999,
|
|
|
|
+ definition: "1",
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
|
+ const data = res.data.rows.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ label: item.name,
|
|
|
|
+ value: item.id,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ resolve(data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const getProductOne = () => {
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
+ proxy
|
|
|
|
+ .post("productInfo/getCustomerProductList", {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 9999,
|
|
|
|
+ definition: "1",
|
|
|
|
+ customerId: "",
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
|
+ const data = res.data.rows.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ label: item.name,
|
|
|
|
+ value: item.id,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ resolve(data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+};
|
|
const getDict = () => {
|
|
const getDict = () => {
|
|
let query = {
|
|
let query = {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -706,21 +752,9 @@ const getDict = () => {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
// 产品
|
|
// 产品
|
|
- proxy
|
|
|
|
- .post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" })
|
|
|
|
- .then((res) => {
|
|
|
|
- if (res.data.rows && res.data.rows.length > 0) {
|
|
|
|
- formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map(
|
|
|
|
- (item) => {
|
|
|
|
- return {
|
|
|
|
- ...item,
|
|
|
|
- label: item.name,
|
|
|
|
- value: item.id,
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ Promise.all([getProduct(), getProductOne()]).then((res) => {
|
|
|
|
+ formGoodsOption.btnConfig.listConfig[0].data = res[0].concat(res[1]);
|
|
|
|
+ });
|
|
// 币种
|
|
// 币种
|
|
proxy
|
|
proxy
|
|
.post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
|
|
.post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
|