SaleInquiryForm.data.ts 11 KB

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