PurchaseOrderFormB2B.data.ts 12 KB

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