Files
aiot-platform-ui/apps/web-antd/dist/js/data-BS3gJPHF.js

2 lines
5.9 KiB
JavaScript
Raw Normal View History

2026-03-23 17:45:01 +08:00
var d=(i,r,a)=>new Promise((n,s)=>{var t=e=>{try{o(a.next(e))}catch(m){s(m)}},l=e=>{try{o(a.throw(e))}catch(m){s(m)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(t,l);o((a=a.apply(i,r)).next())});import{g as f}from"./index-BOqPRs8a.js";import{g as h}from"./index-DZcci6Aw.js";import{c as u}from"./index-MVhSMktH.js";import{g as c}from"./index-BRyDEmPg.js";import{bv as P,as as p}from"./bootstrap-DhvYQWXT.js";import{dg as b,dh as N}from"../jse/index-index-rerQU-kO.js";import{D as I}from"./dict-enum-CaHgMaDZ.js";function w(){var r,n;const i=P();return[{fieldName:"id",component:"Input",dependencies:{triggerFields:[""],show:()=>!1}},{fieldName:"no",label:"合同编号",component:"Input",componentProps:{placeholder:"保存时自动生成",disabled:!0}},{fieldName:"name",label:"合同名称",component:"Input",rules:"required",componentProps:{placeholder:"请输入合同名称"}},{fieldName:"ownerUserId",label:"负责人",component:"ApiSelect",componentProps:{api:c,labelField:"nickname",valueField:"id"},dependencies:{triggerFields:["id"],disabled:t=>t.id},defaultValue:(r=i.userInfo)==null?void 0:r.id,rules:"required"},{fieldName:"customerId",label:"客户名称",component:"ApiSelect",rules:"required",componentProps:{api:u,labelField:"name",valueField:"id",placeholder:"请选择客户"}},{fieldName:"businessId",label:"商机名称",component:"Select",componentProps:{options:[],placeholder:"请选择商机"},dependencies:{triggerFields:["customerId"],disabled:t=>!t.customerId,componentProps(t){return d(this,null,function*(){return t.customerId?{options:(yield f()).filter(e=>e.customerId===t.customerId).map(e=>({label:e.name,value:e.id})),placeholder:"请选择商机"}:{options:[],placeholder:"请选择客户"}})}}},{fieldName:"orderDate",label:"下单日期",component:"DatePicker",rules:"required",componentProps:{showTime:!1,format:"YYYY-MM-DD",valueFormat:"x",placeholder:"请选择下单日期"}},{fieldName:"startTime",label:"合同开始时间",component:"DatePicker",componentProps:{showTime:!1,format:"YYYY-MM-DD",valueFormat:"x",placeholder:"请选择合同开始时间"}},{fieldName:"endTime",label:"合同结束时间",component:"DatePicker",componentProps:{showTime:!1,format:"YYYY-MM-DD",valueFormat:"x",placeholder:"请选择合同结束时间"}},{fieldName:"signUserId",label:"公司签约人",component:"ApiSelect",componentProps:{api:c,labelField:"nickname",valueField:"id"},defaultValue:(n=i.userInfo)==null?void 0:n.id},{fieldName:"signContactId",label:"客户签约人",component:"Select",componentProps:{options:[],placeholder:"请选择客户签约人"},dependencies:{triggerFields:["customerId"],disabled:t=>!t.customerId,componentProps(t){return d(this,null,function*(){return t.customerId?{options:(yield h()).filter(e=>e.customerId===t.customerId).map(e=>({label:e.name,value:e.id})),placeholder:"请选择客户签约人"}:{options:[],placeholder:"请选择客户"}})}}},{fieldName:"remark",label:"备注",component:"Textarea",componentProps:{placeholder:"请输入备注",rows:4}},{fieldName:"product",label:"产品清单",component:"Input",formItemClass:"col-span-3"},{fieldName:"totalProductPrice",label:"产品总金额",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"请输入产品总金额"},rules:p().min(0).optional().default(0)},{fieldName:"discountPercent",label:"整单折扣(%",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"请输入整单折扣"},rules:p().min(0).max(100).optional().default(0)},{fieldName:"totalPrice",label:"折扣后金额",component:"InputNumber",componentProps:{min:0,precision:2,disabled:!0},dependencies:{triggerFields:["totalProductPrice","discountPercent"],trigger(t,l){var e;const o=(e=b(t.totalProductPrice,t.discountPercent/100))!=null?e:0;l.setFieldValue("totalPrice",t.totalProductPrice-o)}}}]}function x(){return[{fieldName:"no",label:"合同编号",component:"Input",componentProps:{placeholder:"请输入合同编号",allowClear:!0}},{fieldName:"name",label:"合同名称",component:"Input",componentProps:{placeholder:"请输入合同名<EFBFBD>