SaleInquiryForm.data.ts 12 KB

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