PurchaseOrderForm.data.ts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  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: '供应商(supplier)',
  30. align:"center",
  31. dataIndex: 'supplierName'
  32. },
  33. {
  34. title: '优先级(priority)',
  35. align:"center",
  36. dataIndex: 'priority_dictText'
  37. },
  38. {
  39. title: '产品分类(production class)',
  40. align:"center",
  41. dataIndex: 'productionClass'
  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: '采购部门(purchase department)',
  55. align:"center",
  56. dataIndex: 'purchaseDepartment'
  57. },
  58. {
  59. title: '采购员(purchaseman)',
  60. align:"center",
  61. dataIndex: 'purchaseman',
  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: '版本号(version)',
  116. align:"center",
  117. dataIndex: 'version',
  118. width:'250'
  119. },
  120. ];
  121. //子表表格配置
  122. export const purchaseOrderShipColumns: JVxeColumn[] = [
  123. {
  124. title: '船名(ship name)',
  125. key: 'shipName',
  126. type: JVxeTypes.normal,
  127. placeholder: '请输入${title}',
  128. defaultValue:'',
  129. },
  130. {
  131. title: '主机号(host number)',
  132. key: 'hostNumber',
  133. type: JVxeTypes.input,
  134. placeholder: '请输入${title}',
  135. defaultValue:'',
  136. },
  137. {
  138. title: '工程编号(project No)',
  139. key: 'projectNo',
  140. type: JVxeTypes.input,
  141. placeholder: '请输入${title}',
  142. defaultValue:'',
  143. },
  144. {
  145. title: '船厂(ship factory)',
  146. key: 'shipFactory',
  147. type: JVxeTypes.normal,
  148. placeholder: '请输入${title}',
  149. defaultValue:'',
  150. },
  151. {
  152. title: '船东(shipowner)',
  153. key: 'shipowner',
  154. type: JVxeTypes.normal,
  155. placeholder: '请输入${title}',
  156. defaultValue:'',
  157. },
  158. {
  159. title: '操作(operation)',
  160. key: 'action',
  161. width:"400px",
  162. // 固定在右侧
  163. fixed: 'right',
  164. // 对齐方式为居中
  165. align: 'center',
  166. // 组件类型定义为【插槽】
  167. type: JVxeTypes.slot,
  168. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  169. slotName: 'action',
  170. },
  171. ]
  172. export const purchaseOrderProductColumns: JVxeColumn[] = [
  173. {
  174. title: '交期(delivery time)',
  175. key: 'deliveryTime',
  176. type: JVxeTypes.date,
  177. placeholder: '请输入${title}',
  178. width:"200px",
  179. defaultValue:'',
  180. },
  181. {
  182. title: '最早发货日期(earline delivery date)',
  183. key: 'earliestDeliveryDate',
  184. type: JVxeTypes.date,
  185. placeholder: '请输入${title}',
  186. width:"200px",
  187. defaultValue:'',
  188. },
  189. {
  190. title: '最晚发货日期(latest delivery date)',
  191. key: 'latestDeliveryDate',
  192. type: JVxeTypes.date,
  193. placeholder: '请输入${title}',
  194. width:"200px",
  195. defaultValue:'',
  196. },
  197. {
  198. title: '产品中文名(chinese name)',
  199. key: 'chineseName',
  200. type: JVxeTypes.input,
  201. placeholder: '请输入${title}',
  202. width:"200px",
  203. defaultValue:'',
  204. },
  205. {
  206. title: '产品英文名(english name)',
  207. key: 'englishName',
  208. type: JVxeTypes.input,
  209. placeholder: '请输入${title}',
  210. width:"200px",
  211. defaultValue:'',
  212. },
  213. {
  214. title: '型号(model)',
  215. key: 'model',
  216. type: JVxeTypes.normal,
  217. placeholder: '请输入${title}',
  218. width:"200px",
  219. defaultValue:'',
  220. },
  221. {
  222. title: '备件号(partno)',
  223. key: 'partno',
  224. type: JVxeTypes.normal,
  225. placeholder: '请输入${title}',
  226. width:"200px",
  227. defaultValue:'',
  228. },
  229. {
  230. title: '订货号(orderno)',
  231. key: 'orderno',
  232. type: JVxeTypes.normal,
  233. placeholder: '请输入${title}',
  234. width:"200px",
  235. defaultValue:'',
  236. },
  237. {
  238. title: '图号(drawingno)',
  239. key: 'drawingno',
  240. type: JVxeTypes.normal,
  241. placeholder: '请输入${title}',
  242. width:"200px",
  243. defaultValue:'',
  244. },
  245. {
  246. title: '厂家(factory)',
  247. key: 'factory',
  248. placeholder: '请输入${title}',
  249. width:"200px",
  250. defaultValue:'',
  251. type: JVxeTypes.select,
  252. options: [],
  253. dictCode: 'factory',
  254. },
  255. {
  256. title: '质量等级(quality grade)',
  257. key: 'qualityGrade',
  258. type: JVxeTypes.select,
  259. options: [],
  260. dictCode: 'quality_grade',
  261. placeholder: '请输入${title}',
  262. width:"200px",
  263. defaultValue:'',
  264. },
  265. {
  266. title: '需要船检证书(need Ship inspection certificate)',
  267. key: 'needShip',
  268. type: JVxeTypes.normal,
  269. placeholder: '请输入${title}',
  270. width:"200px",
  271. defaultValue:'',
  272. },
  273. {
  274. title: '船检证书(ship Inspection certificate)',
  275. key: 'shipInspection',
  276. type: JVxeTypes.normal,
  277. placeholder: '请输入${title}',
  278. width:"200px",
  279. defaultValue:'',
  280. },
  281. {
  282. title: '数量(quantity)',
  283. key: 'quantity',
  284. type: JVxeTypes.inputNumber,
  285. placeholder: '请输入${title}',
  286. width:"200px",
  287. defaultValue:'',
  288. },
  289. {
  290. title: '单价(price)',
  291. key: 'taxPrice',
  292. type: JVxeTypes.inputNumber,
  293. width:"200px",
  294. placeholder: '请输入${title}',
  295. defaultValue:'',
  296. },
  297. {
  298. title: '金额(money)',
  299. key: 'taxAmount',
  300. type: JVxeTypes.inputNumber,
  301. width:"200px",
  302. placeholder: '请输入${title}',
  303. defaultValue:'',
  304. },
  305. {
  306. title: '备注(note)',
  307. key: 'notes',
  308. width:"200px",
  309. type: JVxeTypes.input,
  310. placeholder: '请输入${title}',
  311. defaultValue:'',
  312. },
  313. {
  314. title: '操作(operation)',
  315. key: 'action',
  316. width:"200px",
  317. // 固定在右侧
  318. fixed: 'right',
  319. // 对齐方式为居中
  320. align: 'center',
  321. // 组件类型定义为【插槽】
  322. type: JVxeTypes.slot,
  323. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  324. slotName: 'action',
  325. },
  326. ]
  327. // 高级查询数据
  328. export const superQuerySchema = {
  329. status: {title: '状态(1-已报价,0-已报价)',order: 0,view: 'number', type: 'number',},
  330. otherStatus: {title: '其他状态(other status)',order: 2,view: 'text', type: 'string',},
  331. submit: {title: '提交(1是 0否)',order: 3,view: 'text', type: 'string',},
  332. billDate: {title: '单据日期(bill date)',order: 4,view: 'date', type: 'string',},
  333. billCode: {title: '询价单号(bill code)',order: 5,view: 'text', type: 'string',},
  334. inquiryProject: {title: '询价项目(inquiry project)',order: 6,view: 'text', type: 'string',},
  335. inquiryCustomer: {title: '询价客户(inquiry customer)',order: 7,view: 'text', type: 'string',},
  336. inquiryPlatform: {title: '询价平台(inquiry platform)',order: 8,view: 'text', type: 'string',},
  337. customerInquiryNumber: {title: '客户询价单号(customer inquiry number)',order: 9,view: 'text', type: 'string',},
  338. inquiryPeriodEnd: {title: '询价有效期(inquiry period)止',order: 10,view: 'date', type: 'string',},
  339. inquiryPeriodBegin: {title: '询价有效期(inquiry period)始',order: 11,view: 'date', type: 'string',},
  340. busynessType: {title: '业务类型(busyness type)',order: 12,view: 'text', type: 'string',},
  341. priority: {title: '优先级(priority)',order: 13,view: 'text', type: 'string',},
  342. productionClass: {title: '产品分类(production class)',order: 14,view: 'text', type: 'string',},
  343. model: {title: '机型(model)',order: 15,view: 'text', type: 'string',},
  344. maker: {title: '厂家(maker)',order: 16,view: 'text', type: 'string',},
  345. saleDepartment: {title: '销售部门(sale department)',order: 17,view: 'text', type: 'string',},
  346. salesman: {title: '业务员(salesman)',order: 18,view: 'text', type: 'string',},
  347. inquiryTeam: {title: '采购询价组(procurement inquiry team)',order: 19,view: 'text', type: 'string',},
  348. deliveryTime: {title: '交期(delivery time)',order: 20,view: 'datetime', type: 'string',},
  349. attachs: {title: '附件(attachs)',order: 21,view: 'text', type: 'string',},
  350. inquiryNotes: {title: '询价备注(inquiry notes)',order: 22,view: 'text', type: 'string',},
  351. //子表高级查询
  352. saleInquiryFormShip: {
  353. title: '销售询价单子表 - 船明细',
  354. view: 'table',
  355. fields: {
  356. shipId: {title: '船id',order: 0,view: 'text', type: 'string',},
  357. shipName: {title: '船名',order: 1,view: 'text', type: 'string',},
  358. hostNumber: {title: '主机号',order: 2,view: 'text', type: 'string',},
  359. projectNo: {title: '工程编号',order: 3,view: 'text', type: 'string',},
  360. shipFactory: {title: '船厂',order: 4,view: 'text', type: 'string',},
  361. shipowner: {title: '船东',order: 5,view: 'text', type: 'string',},
  362. }
  363. },
  364. saleInquiryFormProduct: {
  365. title: '销售询价单子表 - 产品明细',
  366. view: 'table',
  367. fields: {
  368. productId: {title: '产品id',order: 0,view: 'number', type: 'number',},
  369. deliveryTime: {title: '交期',order: 1,view: 'date', type: 'string',},
  370. productClass: {title: '产品分类',order: 2,view: 'text', type: 'string',},
  371. productCode: {title: '产品编码',order: 3,view: 'text', type: 'string',},
  372. chineseName: {title: '产品中文名',order: 4,view: 'text', type: 'string',},
  373. englishName: {title: '产品英文名',order: 5,view: 'text', type: 'string',},
  374. specifications: {title: '规格',order: 6,view: 'text', type: 'string',},
  375. model: {title: '型号',order: 7,view: 'text', type: 'string',},
  376. factory: {title: '厂家',order: 8,view: 'text', type: 'string',},
  377. qualityGrade: {title: '质量等级',order: 9,view: 'text', type: 'string',},
  378. quantity: {title: '数量',order: 10,view: 'number', type: 'number',},
  379. unit: {title: '单位',order: 11,view: 'text', type: 'string',},
  380. needShip: {title: '需要船检证书(1是 0否)',order: 12,view: 'text', type: 'string',},
  381. shipInspection: {title: '船检证书',order: 13,view: 'text', type: 'string',},
  382. notes: {title: '备注',order: 14,view: 'text', type: 'string',},
  383. }
  384. },
  385. };