quotationForm.data.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  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'
  56. },
  57. {
  58. title: '产品分类(production class)',
  59. align:"center",
  60. dataIndex: 'productionClass',
  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: '业务类型(busyness type)',
  75. align:"center",
  76. dataIndex: 'busynessType;'
  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: '交期(delivery time)',
  150. key: 'deliveryTime',
  151. type: JVxeTypes.date,
  152. placeholder: '请输入${title}',
  153. width:"200px",
  154. defaultValue:'',
  155. },
  156. {
  157. title: '产品分类(product class)',
  158. key: 'productClass',
  159. type: JVxeTypes.normal,
  160. placeholder: '请输入${title}',
  161. width:"200px",
  162. defaultValue:'',
  163. },
  164. {
  165. title: '产品编码(product code)',
  166. key: 'productCode',
  167. type: JVxeTypes.normal,
  168. placeholder: '请输入${title}',
  169. width:"200px",
  170. defaultValue:'',
  171. },
  172. {
  173. title: '产品中文名(chinese name)',
  174. key: 'chineseName',
  175. type: JVxeTypes.normal,
  176. placeholder: '请输入${title}',
  177. width:"200px",
  178. defaultValue:'',
  179. },
  180. {
  181. title: '产品英文名(english name)',
  182. key: 'englishName',
  183. type: JVxeTypes.normal,
  184. placeholder: '请输入${title}',
  185. width:"200px",
  186. defaultValue:'',
  187. },
  188. {
  189. title: '规格(specifications)',
  190. key: 'specifications',
  191. type: JVxeTypes.normal,
  192. placeholder: '请输入${title}',
  193. width:"200px",
  194. defaultValue:'',
  195. },
  196. {
  197. title: '型号(model)',
  198. key: 'model',
  199. type: JVxeTypes.normal,
  200. placeholder: '请输入${title}',
  201. width:"200px",
  202. defaultValue:'',
  203. },
  204. {
  205. title: '备件号(partno)',
  206. key: 'partno',
  207. type: JVxeTypes.normal,
  208. placeholder: '请输入${title}',
  209. width:"200px",
  210. defaultValue:'',
  211. },
  212. {
  213. title: '订货号(orderno)',
  214. key: 'orderno',
  215. type: JVxeTypes.normal,
  216. placeholder: '请输入${title}',
  217. width:"200px",
  218. defaultValue:'',
  219. },
  220. {
  221. title: '图号(drawingno)',
  222. key: 'drawingno',
  223. type: JVxeTypes.normal,
  224. placeholder: '请输入${title}',
  225. width:"200px",
  226. defaultValue:'',
  227. },
  228. {
  229. title: '厂家(factory)',
  230. key: 'factory',
  231. placeholder: '请输入${title}',
  232. width:"200px",
  233. defaultValue:'',
  234. type: JVxeTypes.normal,
  235. dictCode: 'factory',
  236. },
  237. {
  238. title: '质量等级(quality grade)',
  239. key: 'qualityGrade',
  240. type: JVxeTypes.normal,
  241. placeholder: '请输入${title}',
  242. width:"200px",
  243. defaultValue:'',
  244. },
  245. {
  246. title: '数量(quantity)',
  247. key: 'quantity',
  248. type: JVxeTypes.inputNumber,
  249. placeholder: '请输入${title}',
  250. width:"200px",
  251. defaultValue:'',
  252. },
  253. {
  254. title: '供应商币种(supplier currency)',
  255. key: 'supplierCurrency',
  256. type: JVxeTypes.normal,
  257. placeholder: '请输入${title}',
  258. defaultValue:'',
  259. width:"200px",
  260. },
  261. {
  262. title: '采购单价(purchase price)',
  263. key: 'purchasePrice',
  264. type: JVxeTypes.inputNumber,
  265. placeholder: '请输入${title}',
  266. width:"200px",
  267. defaultValue:'',
  268. },
  269. {
  270. title: '税率(tax rate)',
  271. key: 'taxRate',
  272. type: JVxeTypes.inputNumber,
  273. placeholder: '请输入${title}',
  274. width:"200px",
  275. defaultValue:'',
  276. },
  277. {
  278. title: '毛利率(gross margin)',
  279. key: 'grossMargin',
  280. type: JVxeTypes.inputNumber,
  281. placeholder: '请输入${title}',
  282. width:"200px",
  283. defaultValue:'',
  284. },
  285. {
  286. title: '折扣(discount)',
  287. key: 'discount',
  288. type: JVxeTypes.inputNumber,
  289. placeholder: '请输入${title}',
  290. width:"200px",
  291. defaultValue:'',
  292. },
  293. {
  294. title: '关税(tariff)',
  295. key: 'tariff',
  296. type: JVxeTypes.inputNumber,
  297. placeholder: '请输入${title}',
  298. width:"200px",
  299. defaultValue:'',
  300. },
  301. {
  302. title: '客户佣金(customer commission)',
  303. key: 'customerCommision',
  304. type: JVxeTypes.inputNumber,
  305. placeholder: '请输入${title}',
  306. width:"200px",
  307. defaultValue:'',
  308. },
  309. {
  310. title: '中间人佣金(intermediator commission)',
  311. key: 'intermediatorCommission',
  312. type: JVxeTypes.inputNumber,
  313. placeholder: '请输入${title}',
  314. width:"200px",
  315. defaultValue:'',
  316. },
  317. {
  318. title: '销售单价(sale price)',
  319. key: 'salePrice',
  320. type: JVxeTypes.normal,
  321. placeholder: '请输入${title}',
  322. width:"200px",
  323. defaultValue:'',
  324. },
  325. {
  326. title: '上一次报价(last price)',
  327. key: 'lastPrice',
  328. type: JVxeTypes.slot,
  329. placeholder: '请输入${title}',
  330. width:"200px",
  331. defaultValue:'',
  332. slotName: 'lastPrice',
  333. },
  334. {
  335. title: '含税报价(tax amount)',
  336. key: 'taxAmount',
  337. type: JVxeTypes.normal,
  338. placeholder: '请输入${title}',
  339. width:"200px",
  340. defaultValue:'',
  341. },
  342. {
  343. title: '备注(note)',
  344. key: 'notes',
  345. width:"200px",
  346. type: JVxeTypes.input,
  347. placeholder: '请输入${title}',
  348. defaultValue:'',
  349. },
  350. {
  351. title: '操作(operation)',
  352. key: 'action',
  353. width:"200px",
  354. // 固定在右侧
  355. fixed: 'right',
  356. // 对齐方式为居中
  357. align: 'center',
  358. // 组件类型定义为【插槽】
  359. type: JVxeTypes.slot,
  360. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  361. slotName: 'action',
  362. },
  363. ]
  364. // 高级查询数据
  365. export const superQuerySchema = {
  366. status: {title: '状态(1-已报价,0-已报价)',order: 0,view: 'number', type: 'number',},
  367. otherStatus: {title: '其他状态(other status)',order: 2,view: 'text', type: 'string',},
  368. submit: {title: '提交(1是 0否)',order: 3,view: 'text', type: 'string',},
  369. billDate: {title: '单据日期(bill date)',order: 4,view: 'date', type: 'string',},
  370. billCode: {title: '询价单号(bill code)',order: 5,view: 'text', type: 'string',},
  371. inquiryProject: {title: '询价项目(inquiry project)',order: 6,view: 'text', type: 'string',},
  372. inquiryCustomer: {title: '询价客户(inquiry customer)',order: 7,view: 'text', type: 'string',},
  373. inquiryPlatform: {title: '询价平台(inquiry platform)',order: 8,view: 'text', type: 'string',},
  374. customerInquiryNumber: {title: '客户询价单号(customer inquiry number)',order: 9,view: 'text', type: 'string',},
  375. inquiryPeriodEnd: {title: '询价有效期(inquiry period)止',order: 10,view: 'date', type: 'string',},
  376. inquiryPeriodBegin: {title: '询价有效期(inquiry period)始',order: 11,view: 'date', type: 'string',},
  377. busynessType: {title: '业务类型(busyness type)',order: 12,view: 'text', type: 'string',},
  378. priority: {title: '优先级(priority)',order: 13,view: 'text', type: 'string',},
  379. productionClass: {title: '产品分类(production class)',order: 14,view: 'text', type: 'string',},
  380. model: {title: '机型(model)',order: 15,view: 'text', type: 'string',},
  381. maker: {title: '厂家(maker)',order: 16,view: 'text', type: 'string',},
  382. saleDepartment: {title: '销售部门(sale department)',order: 17,view: 'text', type: 'string',},
  383. salesman: {title: '业务员(salesman)',order: 18,view: 'text', type: 'string',},
  384. inquiryTeam: {title: '采购询价组(procurement inquiry team)',order: 19,view: 'text', type: 'string',},
  385. deliveryTime: {title: '交期(delivery time)',order: 20,view: 'datetime', type: 'string',},
  386. attachs: {title: '附件(attachs)',order: 21,view: 'text', type: 'string',},
  387. inquiryNotes: {title: '询价备注(inquiry notes)',order: 22,view: 'text', type: 'string',},
  388. //子表高级查询
  389. saleInquiryFormShip: {
  390. title: '销售询价单子表 - 船明细',
  391. view: 'table',
  392. fields: {
  393. shipId: {title: '船id',order: 0,view: 'text', type: 'string',},
  394. shipName: {title: '船名',order: 1,view: 'text', type: 'string',},
  395. hostNumber: {title: '主机号',order: 2,view: 'text', type: 'string',},
  396. projectNo: {title: '工程编号',order: 3,view: 'text', type: 'string',},
  397. shipFactory: {title: '船厂',order: 4,view: 'text', type: 'string',},
  398. shipowner: {title: '船东',order: 5,view: 'text', type: 'string',},
  399. }
  400. },
  401. saleInquiryFormProduct: {
  402. title: '销售询价单子表 - 产品明细',
  403. view: 'table',
  404. fields: {
  405. productId: {title: '产品id',order: 0,view: 'number', type: 'number',},
  406. deliveryTime: {title: '交期',order: 1,view: 'date', type: 'string',},
  407. productClass: {title: '产品分类',order: 2,view: 'text', type: 'string',},
  408. productCode: {title: '产品编码',order: 3,view: 'text', type: 'string',},
  409. chineseName: {title: '产品中文名',order: 4,view: 'text', type: 'string',},
  410. englishName: {title: '产品英文名',order: 5,view: 'text', type: 'string',},
  411. specifications: {title: '规格',order: 6,view: 'text', type: 'string',},
  412. model: {title: '型号',order: 7,view: 'text', type: 'string',},
  413. factory: {title: '厂家',order: 8,view: 'text', type: 'string',},
  414. qualityGrade: {title: '质量等级',order: 9,view: 'text', type: 'string',},
  415. quantity: {title: '数量',order: 10,view: 'number', type: 'number',},
  416. unit: {title: '单位',order: 11,view: 'text', type: 'string',},
  417. needShip: {title: '需要船检证书(1是 0否)',order: 12,view: 'text', type: 'string',},
  418. shipInspection: {title: '船检证书',order: 13,view: 'text', type: 'string',},
  419. notes: {title: '备注',order: 14,view: 'text', type: 'string',},
  420. }
  421. },
  422. };