PurchaseInquiryForm.data.ts 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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. },
  19. {
  20. title: '询价项目(inquiry project)',
  21. align:"center",
  22. dataIndex: 'projectName',
  23. customRender:({text,record}) =>{
  24. if(record.inquiryProject_dictText==1){
  25. return text;
  26. }else if(record.inquiryProject_dictText==0){
  27. return text+'(停用)'
  28. }
  29. }
  30. },
  31. {
  32. title: '供应商编码(supplier code)',
  33. align:"center",
  34. width:150,
  35. dataIndex: 'inquirySuppiler_dictText'
  36. },
  37. {
  38. title: '供应商名称(inquiry name)',
  39. align:"center",
  40. width:280,
  41. dataIndex: 'suppilerName'
  42. },
  43. {
  44. title: '询价有效期(inquiry period)',
  45. align:"center",
  46. dataIndex: 'inquiryPeriodEnd',
  47. width:250,
  48. // customRender:({text,record}) =>{
  49. // if(record.inquiryPeriodBegin&&record.inquiryPeriodEnd){
  50. // text = record.inquiryPeriodBegin+'~'+record.inquiryPeriodEnd
  51. // }else if(!record.inquiryPeriodBegin){
  52. // text = record.inquiryPeriodEnd
  53. // }else if(!record.inquiryPeriodEnd){
  54. // text = record.inquiryPeriodBegin
  55. // }else{
  56. // text=''
  57. // }
  58. // return text;
  59. // },
  60. },
  61. {
  62. title: '优先级(priority)',
  63. align:"center",
  64. dataIndex: 'priority_dictText'
  65. },
  66. {
  67. title: '产品分类(production class)',
  68. align:"center",
  69. dataIndex: 'productionClass_dictText'
  70. },
  71. {
  72. title: '机型(model)',
  73. align:"center",
  74. dataIndex: 'model'
  75. },
  76. {
  77. title: '厂家(maker)',
  78. align:"center",
  79. dataIndex: 'maker'
  80. },
  81. {
  82. title: '来源(sourceCode)',
  83. align:"center",
  84. dataIndex: 'sourceCode'
  85. },
  86. {
  87. title: '状态(status)',
  88. align:"center",
  89. dataIndex: 'status_dictText',
  90. },
  91. {
  92. title: '销售询价单附件(sales inquiry form attachs)',
  93. align:"center",
  94. dataIndex: 'saleAttachs',
  95. width:350,
  96. slots: { customRender: 'saleAttachs' },
  97. },
  98. {
  99. title: '提交(submit)',
  100. align:"center",
  101. dataIndex: 'submit_dictText',
  102. },
  103. {
  104. title: '制单人',
  105. align:"center",
  106. dataIndex: 'createBy',
  107. },
  108. {
  109. title: '制单时间',
  110. align:"center",
  111. dataIndex: 'createTime',
  112. width:180,
  113. },
  114. ];
  115. //子表表格配置
  116. export const PuechaseInquiryFormShipColumns: JVxeColumn[] = [
  117. {
  118. title: '船名(ship name)',
  119. key: 'shipName',
  120. type: JVxeTypes.normal,
  121. placeholder: '请输入${title}',
  122. defaultValue:'',
  123. },
  124. {
  125. title: '主机号(host number)',
  126. key: 'hostNumber',
  127. type: JVxeTypes.input,
  128. placeholder: '请输入${title}',
  129. defaultValue:'',
  130. },
  131. {
  132. title: '工程编号(project No)',
  133. key: 'projectNo',
  134. type: JVxeTypes.input,
  135. placeholder: '请输入${title}',
  136. defaultValue:'',
  137. },
  138. {
  139. title: '船厂(ship factory)',
  140. key: 'shipFactory',
  141. type: JVxeTypes.normal,
  142. placeholder: '请输入${title}',
  143. defaultValue:'',
  144. },
  145. {
  146. title: '船东(shipowner)',
  147. key: 'shipowner',
  148. type: JVxeTypes.normal,
  149. placeholder: '请输入${title}',
  150. defaultValue:'',
  151. },
  152. {
  153. title: '操作(operation)',
  154. key: 'action',
  155. width:"400px",
  156. // 固定在右侧
  157. fixed: 'right',
  158. // 对齐方式为居中
  159. align: 'center',
  160. // 组件类型定义为【插槽】
  161. type: JVxeTypes.slot,
  162. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  163. slotName: 'action',
  164. },
  165. ]
  166. export const PuechaseInquiryFormProductColumns: JVxeColumn[] = [
  167. // {
  168. // title: '产品分类(product class)',
  169. // key: 'productClass',
  170. // type: JVxeTypes.normal,
  171. // placeholder: '请输入${title}',
  172. // width:"200px",
  173. // defaultValue:'',
  174. // },
  175. {
  176. title: '产品编码(product code)',
  177. key: 'productCode',
  178. type: JVxeTypes.normal,
  179. placeholder: '请输入${title}',
  180. width:"200px",
  181. defaultValue:'',
  182. },
  183. {
  184. title: '产品中文名(chinese name)',
  185. key: 'chineseName',
  186. type: JVxeTypes.input,
  187. placeholder: '请输入${title}',
  188. width:"200px",
  189. defaultValue:'',
  190. },
  191. {
  192. title: '产品英文名(english name)',
  193. key: 'englishName',
  194. type: JVxeTypes.input,
  195. placeholder: '请输入${title}',
  196. width:"200px",
  197. defaultValue:'',
  198. },
  199. {
  200. title: '型号(model)',
  201. key: 'model',
  202. type: JVxeTypes.normal,
  203. placeholder: '请输入${title}',
  204. width:"200px",
  205. defaultValue:'',
  206. },
  207. {
  208. title: '备件号(partno)',
  209. key: 'partno',
  210. type: JVxeTypes.normal,
  211. placeholder: '请输入${title}',
  212. width:"200px",
  213. defaultValue:'',
  214. },
  215. {
  216. title: '订货号(orderno)',
  217. key: 'orderno',
  218. type: JVxeTypes.normal,
  219. placeholder: '请输入${title}',
  220. width:"200px",
  221. defaultValue:'',
  222. },
  223. {
  224. title: '图号(drawingno)',
  225. key: 'drawingno',
  226. type: JVxeTypes.normal,
  227. placeholder: '请输入${title}',
  228. width:"200px",
  229. defaultValue:'',
  230. },
  231. // {
  232. // title: '厂家(factory)',
  233. // key: 'factory',
  234. // placeholder: '请输入${title}',
  235. // width:"200px",
  236. // defaultValue:'',
  237. // type: JVxeTypes.select,
  238. // options: [],
  239. // dictCode: 'factory',
  240. // },
  241. {
  242. title: '质量等级(quality grade)',
  243. key: 'qualityGrade',
  244. type: JVxeTypes.select,
  245. options: [],
  246. dictCode: 'quality_grade',
  247. placeholder: '请输入${title}',
  248. width:"200px",
  249. defaultValue:'',
  250. },
  251. {
  252. title: '需要船检证书(need Ship inspection certificate)',
  253. key: 'needShip',
  254. width:"200px",
  255. placeholder: '请输入${title}',
  256. defaultValue:'',
  257. type: JVxeTypes.normal,
  258. formatter({ cellValue, row, column }) {
  259. if(row.needShip=='0'){
  260. return '否'
  261. }else{
  262. return '是'
  263. }
  264. },
  265. },
  266. {
  267. title: '船检证书(ship Inspection certificate)',
  268. key: 'shipInspection',
  269. type: JVxeTypes.normal,
  270. width:"200px",
  271. placeholder: '请输入${title}',
  272. defaultValue:'',
  273. },
  274. {
  275. title: '数量(quantity)',
  276. key: 'quantity',
  277. type: JVxeTypes.inputNumber,
  278. validateRules: [{ required: true, message: '' }],
  279. placeholder: '请输入${title}',
  280. width:"200px",
  281. defaultValue:'',
  282. },
  283. {
  284. title: '单位(unit)',
  285. key: 'unit',
  286. type: JVxeTypes.normal,
  287. placeholder: '请输入${title}',
  288. defaultValue:'',
  289. width:"200px",
  290. },
  291. {
  292. title: '备注(note)',
  293. key: 'notes',
  294. width:"200px",
  295. type: JVxeTypes.input,
  296. placeholder: '请输入${title}',
  297. defaultValue:'',
  298. },
  299. {
  300. title: '操作(operation)',
  301. key: 'action',
  302. width:"200px",
  303. // 固定在右侧
  304. fixed: 'right',
  305. // 对齐方式为居中
  306. align: 'center',
  307. // 组件类型定义为【插槽】
  308. type: JVxeTypes.slot,
  309. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  310. slotName: 'action',
  311. },
  312. ]