SaleOrderForm.data.ts 12 KB

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