shenwu 5 meses atrás
pai
commit
553cd5f505

+ 21 - 4
src/pages/distribution/miniprogram/weChatInfo/index.tsx

@@ -32,7 +32,7 @@ const Page: React.FC = () => {
   const formRef = useRef<ProFormInstance>();
   const assignRormRef = useRef<ProFormInstance>();
   const actionRef = useRef<ActionType>();
-  let { state } = useModel('global');
+  let { state ,getEnum} = useModel('global');
   let [open, setOpen] = useState<any>(null); //新增
   let [assignOpen, setAssignOpen] = useState(false);
   let [editValues, setEditValues] = useState<any>({});
@@ -171,7 +171,7 @@ const Page: React.FC = () => {
       <BetaSchemaForm<DataItem>
         title={editValues?.appName + '小程序指派'}
         formRef={assignRormRef}
-        width={400}
+        width={700}
         open={assignOpen}
         onOpenChange={(b) => {
           if (!b) {
@@ -183,15 +183,17 @@ const Page: React.FC = () => {
         labelCol={{ span: 6 }}
         wrapperCol={{ span: 14 }}
         grid={true}
-        rowProps={{ gutter: [20, 20] }}
         layout="horizontal"
         onFinish={assign}
+        modalProps={{
+          destroyOnClose:true
+        }}
         columns={[
           {
             title: '分销商',
             dataIndex: 'distributorId',
             formItemProps: {
-              style: { marginTop: 20 },
+              style: { marginBottom: 10 },
               rules: [
                 {
                   required: true,
@@ -204,6 +206,21 @@ const Page: React.FC = () => {
               return new Map(arr?.map(({ id, companyName }: any) => [id, companyName]));
             },
           },
+          {
+            title: '允许投放的载体',
+            dataIndex: 'advertisingChannels',
+            formItemProps: {
+              style: { marginBottom: 10 },
+              rules: [
+                {
+                  required: true,
+                  message: '此项为必填项',
+                },
+              ],
+            },
+            valueType:'checkbox',
+            valueEnum:getEnum("ADVERTISING_CHANNEL",'map'),
+          },
         ]}
         loading={WxAppInfoWxAppConfigAddOrEdit?.loading}
       />

+ 0 - 24
src/pages/distribution/miniprogram/weChatInfo/tableConfig.tsx

@@ -80,30 +80,6 @@ export const columns = (
         return d.iosPayment ? <Tag color="processing" bordered={false}>{d.iosPayment}</Tag> : <Tag color="error" bordered={false}>IOS无法支付</Tag>
       }
     },
-    {
-      title: '小程序配置信息(json)',
-      dataIndex: 'configParamList',
-      key: 'configParamList',
-      width: 80,
-      ellipsis: true,
-      align: 'center',
-      hideInSearch: true,
-      render: (a, b) => {
-        return (
-          <Space size={[0, 0]} wrap>
-            {b?.configParamList?.map((item: any, index: number) => {
-              return (
-                <Tooltip title={JSON.stringify(item['additionalProp' + (index + 1)])} key={index}>
-                  <Button type="link" size="small">
-                    配置{index + 1}
-                  </Button>
-                </Tooltip>
-              );
-            })}
-          </Space>
-        );
-      },
-    },
     {
       title: '备注',
       dataIndex: 'remark',