quotationForm.data.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. import {BasicColumn} from '/@/components/Table';
  2. import {FormSchema} from '/@/components/Table';
  3. import { rules} from '/@/utils/helper/validator';
  4. import { render } from '/@/utils/common/renderUtils';
  5. import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
  6. //列表数据
  7. export const columns: BasicColumn[] = [
  8. {
  9. title: '报价单号(bill code)',
  10. align:"center",
  11. dataIndex: 'billCode'
  12. },
  13. {
  14. title: '单据日期(bill date)',
  15. align:"center",
  16. dataIndex: 'billDate',
  17. customRender:({text}) =>{
  18. text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
  19. return text;
  20. },
  21. },
  22. {
  23. title: '报价项目(quotation project)',
  24. align:"center",
  25. width:250,
  26. dataIndex: 'quotationProjectName'
  27. },
  28. {
  29. title: '报价客户(quotation customer)',
  30. align:"center",
  31. width:250,
  32. dataIndex: 'quotationCustomerName'
  33. },
  34. {
  35. title: '报价有效期(quotation period)',
  36. align:"center",
  37. dataIndex: 'time',
  38. width:250,
  39. customRender:({text,record}) =>{
  40. if(record.quotationPeriodBegin&&record.quotationPeriodEnd){
  41. text = record.quotationPeriodBegin+'~'+record.quotationPeriodEnd
  42. }else if(!record.quotationPeriodBegin){
  43. text = record.quotationPeriodEnd
  44. }else if(!record.quotationPeriodEnd){
  45. text = record.quotationPeriodBegin
  46. }else{
  47. text=''
  48. }
  49. return text;
  50. },
  51. },
  52. {
  53. title: '优先级(priority)',
  54. align:"center",
  55. dataIndex: 'priority_dictText'
  56. },
  57. {
  58. title: '产品分类(production class)',
  59. align:"center",
  60. dataIndex: 'productionClass_dictText',
  61. width:250,
  62. },
  63. {
  64. title: '机型(model)',
  65. align:"center",
  66. dataIndex: 'model'
  67. },
  68. {
  69. title: '厂家(maker)',
  70. align:"center",
  71. dataIndex: 'maker'
  72. },
  73. {
  74. title: '来源(sourceCode)',
  75. align:"center",
  76. dataIndex: 'sourceCode'
  77. },
  78. {
  79. title: '状态(status)',
  80. align:"center",
  81. dataIndex: 'status',
  82. customRender:function (t, r, index) {
  83. if(t.text==1){
  84. return '已确认'
  85. }else if(t.text==0){
  86. return '未确认'
  87. }
  88. }
  89. },
  90. {
  91. title: '版本号(version)',
  92. align:"center",
  93. dataIndex: 'version'
  94. },
  95. ];
  96. //子表表格配置
  97. export const saleQuotationFormShipColumns: JVxeColumn[] = [
  98. {
  99. title: '船名(ship name)',
  100. key: 'shipName',
  101. type: JVxeTypes.normal,
  102. placeholder: '请输入${title}',
  103. defaultValue:'',
  104. },
  105. {
  106. title: '主机号(host number)',
  107. key: 'hostNumber',
  108. type: JVxeTypes.input,
  109. placeholder: '请输入${title}',
  110. defaultValue:'',
  111. },
  112. {
  113. title: '工程编号(project No)',
  114. key: 'projectNo',
  115. type: JVxeTypes.input,
  116. placeholder: '请输入${title}',
  117. defaultValue:'',
  118. },
  119. {
  120. title: '船厂(ship factory)',
  121. key: 'shipFactory',
  122. type: JVxeTypes.normal,
  123. placeholder: '请输入${title}',
  124. defaultValue:'',
  125. },
  126. {
  127. title: '船东(shipowner)',
  128. key: 'shipowner',
  129. type: JVxeTypes.normal,
  130. placeholder: '请输入${title}',
  131. defaultValue:'',
  132. },
  133. {
  134. title: '操作(operation)',
  135. key: 'action',
  136. width:"400px",
  137. // 固定在右侧
  138. fixed: 'right',
  139. // 对齐方式为居中
  140. align: 'center',
  141. // 组件类型定义为【插槽】
  142. type: JVxeTypes.slot,
  143. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  144. slotName: 'action',
  145. },
  146. ]
  147. export const saleQuotationFormProductColumns: JVxeColumn[] = [
  148. {
  149. title: '产品英文名(english name)',
  150. key: 'englishName',
  151. type: JVxeTypes.input,
  152. placeholder: '请输入${title}',
  153. width:"200px",
  154. defaultValue:'',
  155. fixed: 'left',
  156. },
  157. {
  158. title: '备件号(partno)',
  159. key: 'partno',
  160. type: JVxeTypes.normal,
  161. placeholder: '请输入${title}',
  162. width:"200px",
  163. defaultValue:'',
  164. fixed: 'left',
  165. },
  166. {
  167. title: '交期(delivery time)',
  168. key: 'deliveryDayChild',
  169. type: JVxeTypes.inputNumber,
  170. placeholder: '请输入${title}',
  171. width:"200px",
  172. defaultValue:'',
  173. },
  174. // {
  175. // title: '产品分类(product class)',
  176. // key: 'productClass',
  177. // type: JVxeTypes.normal,
  178. // placeholder: '请输入${title}',
  179. // width:"200px",
  180. // defaultValue:'',
  181. // },
  182. {
  183. title: '产品编码(product code)',
  184. key: 'productCode',
  185. type: JVxeTypes.normal,
  186. placeholder: '请输入${title}',
  187. width:"200px",
  188. defaultValue:'',
  189. },
  190. {
  191. title: '产品中文名(chinese name)',
  192. key: 'chineseName',
  193. type: JVxeTypes.normal,
  194. placeholder: '请输入${title}',
  195. width:"200px",
  196. defaultValue:'',
  197. },
  198. // {
  199. // title: '规格(specifications)',
  200. // key: 'specifications',
  201. // type: JVxeTypes.normal,
  202. // placeholder: '请输入${title}',
  203. // width:"200px",
  204. // defaultValue:'',
  205. // },
  206. {
  207. title: '型号(model)',
  208. key: 'model',
  209. type: JVxeTypes.normal,
  210. placeholder: '请输入${title}',
  211. width:"200px",
  212. defaultValue:'',
  213. },
  214. {
  215. title: '订货号(orderno)',
  216. key: 'orderno',
  217. type: JVxeTypes.normal,
  218. placeholder: '请输入${title}',
  219. width:"200px",
  220. defaultValue:'',
  221. },
  222. {
  223. title: '图号(drawingno)',
  224. key: 'drawingno',
  225. type: JVxeTypes.normal,
  226. placeholder: '请输入${title}',
  227. width:"200px",
  228. defaultValue:'',
  229. },
  230. // {
  231. // title: '厂家(factory)',
  232. // key: 'factory',
  233. // placeholder: '请输入${title}',
  234. // width:"200px",
  235. // defaultValue:'',
  236. // type: JVxeTypes.normal,
  237. // dictCode: 'factory',
  238. // },
  239. {
  240. title: '质量等级(quality grade)',
  241. key: 'qualityGrade',
  242. type: JVxeTypes.normal,
  243. placeholder: '请输入${title}',
  244. width:"200px",
  245. defaultValue:'',
  246. },
  247. {
  248. title: '数量(quantity)',
  249. key: 'quantity',
  250. type: JVxeTypes.inputNumber,
  251. validateRules: [{ required: true, message: '' }],
  252. placeholder: '请输入${title}',
  253. width:"200px",
  254. defaultValue:'',
  255. },
  256. // {
  257. // title: '供应商币种(supplier currency)',
  258. // key: 'supplierCurrency',
  259. // type: JVxeTypes.normal,
  260. // placeholder: '请输入${title}',
  261. // defaultValue:'',
  262. // width:"200px",
  263. // },
  264. {
  265. title: '采购单价(purchase price)',
  266. key: 'purchasePrice',
  267. type: JVxeTypes.inputNumber,
  268. placeholder: '请输入${title}',
  269. width:"200px",
  270. defaultValue:'',
  271. },
  272. {
  273. title: '采购金额(purchase amount)',
  274. key: 'purchaseAmount',
  275. type: JVxeTypes.inputNumber,
  276. placeholder: '请输入${title}',
  277. width:"200px",
  278. defaultValue:'',
  279. statistics:['sum'],
  280. },
  281. {
  282. title: '税率(tax rate)',
  283. key: 'taxRate',
  284. type: JVxeTypes.inputNumber,
  285. placeholder: '请输入${title}',
  286. width:"200px",
  287. defaultValue:'',
  288. },
  289. {
  290. title: '毛利率(gross margin)',
  291. key: 'grossMargin',
  292. type: JVxeTypes.inputNumber,
  293. placeholder: '请输入${title}',
  294. width:"200px",
  295. defaultValue:'',
  296. },
  297. {
  298. title: '折扣(discount)',
  299. key: 'discount',
  300. type: JVxeTypes.inputNumber,
  301. placeholder: '请输入${title}',
  302. width:"200px",
  303. defaultValue:'',
  304. },
  305. {
  306. title: '关税(tariff)',
  307. key: 'tariff',
  308. type: JVxeTypes.inputNumber,
  309. placeholder: '请输入${title}',
  310. width:"200px",
  311. defaultValue:'',
  312. },
  313. {
  314. title: '销售单价(sale price)',
  315. key: 'salePrice',
  316. type: JVxeTypes.inputNumber,
  317. validateRules: [{ required: true, message: '' }],
  318. placeholder: '请输入${title}',
  319. width:"200px",
  320. defaultValue:'',
  321. },
  322. {
  323. title: '上一次报价(last price)',
  324. key: 'lastPrice',
  325. type: JVxeTypes.slot,
  326. placeholder: '请输入${title}',
  327. width:"200px",
  328. defaultValue:'',
  329. slotName: 'lastPrice',
  330. },
  331. {
  332. title: '金额(amount)',
  333. key: 'taxAmount',
  334. type: JVxeTypes.normal,
  335. placeholder: '请输入${title}',
  336. width:"200px",
  337. defaultValue:'',
  338. statistics:['sum'],
  339. },
  340. {
  341. title: '备注(note)',
  342. key: 'notes',
  343. width:"200px",
  344. type: JVxeTypes.input,
  345. placeholder: '请输入${title}',
  346. defaultValue:'',
  347. },
  348. {
  349. title: '客户佣金(customer commission)',
  350. key: 'customerCommision',
  351. type: JVxeTypes.normal,
  352. placeholder: '请输入${title}',
  353. width:"200px",
  354. defaultValue:'',
  355. },
  356. {
  357. title: '中间人佣金(intermediator commission)',
  358. key: 'intermediatorCommission',
  359. type: JVxeTypes.normal,
  360. placeholder: '请输入${title}',
  361. width:"200px",
  362. defaultValue:'',
  363. },
  364. {
  365. title: '操作(operation)',
  366. key: 'action',
  367. width:"200px",
  368. // 固定在右侧
  369. fixed: 'right',
  370. // 对齐方式为居中
  371. align: 'center',
  372. // 组件类型定义为【插槽】
  373. type: JVxeTypes.slot,
  374. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  375. slotName: 'action',
  376. },
  377. ]
  378. // 高级查询数据
  379. export const superQuerySchema = {
  380. status: {title: '状态(1-已报价,0-已报价)',order: 0,view: 'number', type: 'number',},
  381. otherStatus: {title: '其他状态(other status)',order: 2,view: 'text', type: 'string',},
  382. submit: {title: '提交(1是 0否)',order: 3,view: 'text', type: 'string',},
  383. billDate: {title: '单据日期(bill date)',order: 4,view: 'date', type: 'string',},
  384. billCode: {title: '询价单号(bill code)',order: 5,view: 'text', type: 'string',},
  385. inquiryProject: {title: '询价项目(inquiry project)',order: 6,view: 'text', type: 'string',},
  386. inquiryCustomer: {title: '询价客户(inquiry customer)',order: 7,view: 'text', type: 'string',},
  387. inquiryPlatform: {title: '询价平台(inquiry platform)',order: 8,view: 'text', type: 'string',},
  388. customerInquiryNumber: {title: '客户询价单号(customer inquiry number)',order: 9,view: 'text', type: 'string',},
  389. inquiryPeriodEnd: {title: '询价有效期(inquiry period)止',order: 10,view: 'date', type: 'string',},
  390. inquiryPeriodBegin: {title: '询价有效期(inquiry period)始',order: 11,view: 'date', type: 'string',},
  391. busynessType: {title: '业务类型(busyness type)',order: 12,view: 'text', type: 'string',},
  392. priority: {title: '优先级(priority)',order: 13,view: 'text', type: 'string',},
  393. productionClass: {title: '产品分类(production class)',order: 14,view: 'text', type: 'string',},
  394. model: {title: '机型(model)',order: 15,view: 'text', type: 'string',},
  395. maker: {title: '厂家(maker)',order: 16,view: 'text', type: 'string',},
  396. saleDepartment: {title: '销售部门(sale department)',order: 17,view: 'text', type: 'string',},
  397. salesman: {title: '业务员(salesman)',order: 18,view: 'text', type: 'string',},
  398. inquiryTeam: {title: '采购询价组(procurement inquiry team)',order: 19,view: 'text', type: 'string',},
  399. deliveryTime: {title: '交期(delivery time)',order: 20,view: 'datetime', type: 'string',},
  400. attachs: {title: '附件(attachs)',order: 21,view: 'text', type: 'string',},
  401. inquiryNotes: {title: '询价备注(inquiry notes)',order: 22,view: 'text', type: 'string',},
  402. //子表高级查询
  403. saleInquiryFormShip: {
  404. title: '销售询价单子表 - 船明细',
  405. view: 'table',
  406. fields: {
  407. shipId: {title: '船id',order: 0,view: 'text', type: 'string',},
  408. shipName: {title: '船名',order: 1,view: 'text', type: 'string',},
  409. hostNumber: {title: '主机号',order: 2,view: 'text', type: 'string',},
  410. projectNo: {title: '工程编号',order: 3,view: 'text', type: 'string',},
  411. shipFactory: {title: '船厂',order: 4,view: 'text', type: 'string',},
  412. shipowner: {title: '船东',order: 5,view: 'text', type: 'string',},
  413. }
  414. },
  415. saleInquiryFormProduct: {
  416. title: '销售询价单子表 - 产品明细',
  417. view: 'table',
  418. fields: {
  419. productId: {title: '产品id',order: 0,view: 'number', type: 'number',},
  420. deliveryTime: {title: '交期',order: 1,view: 'date', type: 'string',},
  421. productClass: {title: '产品分类',order: 2,view: 'text', type: 'string',},
  422. productCode: {title: '产品编码',order: 3,view: 'text', type: 'string',},
  423. chineseName: {title: '产品中文名',order: 4,view: 'text', type: 'string',},
  424. englishName: {title: '产品英文名',order: 5,view: 'text', type: 'string',},
  425. specifications: {title: '规格',order: 6,view: 'text', type: 'string',},
  426. model: {title: '型号',order: 7,view: 'text', type: 'string',},
  427. factory: {title: '厂家',order: 8,view: 'text', type: 'string',},
  428. qualityGrade: {title: '质量等级',order: 9,view: 'text', type: 'string',},
  429. quantity: {title: '数量',order: 10,view: 'number', type: 'number',},
  430. unit: {title: '单位',order: 11,view: 'text', type: 'string',},
  431. needShip: {title: '需要船检证书(1是 0否)',order: 12,view: 'text', type: 'string',},
  432. shipInspection: {title: '船检证书',order: 13,view: 'text', type: 'string',},
  433. notes: {title: '备注',order: 14,view: 'text', type: 'string',},
  434. }
  435. },
  436. };