salesInvoiceForm.data.ts 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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. //列表数据
  7. export const columns: BasicColumn[] = [
  8. {
  9. title: '发票单号(invoice code)',
  10. align: 'center',
  11. ellipsis: true,
  12. dataIndex: 'invoiceCode',
  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. ellipsis: true,
  27. dataIndex: 'projectName',
  28. customRender:({text,record}) =>{
  29. if(record.project_dictText==1){
  30. return text;
  31. }else if(record.project_dictText==0){
  32. return text+'(停用)'
  33. }
  34. }
  35. },
  36. {
  37. title: '客户订单号(customer order number)',
  38. align: 'center',
  39. width: 250,
  40. dataIndex: 'orderNumber',
  41. },
  42. {
  43. title: '币种(currency)',
  44. align: 'center',
  45. dataIndex: 'currency',
  46. },
  47. {
  48. title: '购方(buyer)',
  49. align: 'center',
  50. ellipsis: true,
  51. dataIndex: 'customerName',
  52. },
  53. {
  54. title: '购方税号(buyer tax number)',
  55. align: 'center',
  56. dataIndex: 'buyerTaxNumber',
  57. width: 250,
  58. ellipsis: true,
  59. },
  60. {
  61. title: '通知单来源(sourceCode)',
  62. align: 'center',
  63. dataIndex: 'sourceCode',
  64. width: 200,
  65. ellipsis: true,
  66. },
  67. {
  68. title: '佣金来源(sourceCode)',
  69. align: 'center',
  70. dataIndex: 'sourceCode2',
  71. width: 200,
  72. ellipsis: true,
  73. },
  74. {
  75. title: '销售订单(sale order)',
  76. align: 'center',
  77. dataIndex: 'saleOrder',
  78. width: 200,
  79. slots: { customRender: 'jumpToAndExport' },
  80. },
  81. {
  82. title: '采购订单(purchase order)',
  83. align: 'center',
  84. dataIndex: 'purchaseOrder',
  85. width: 200,
  86. slots: { customRender: 'jumpToAndExport' },
  87. },
  88. {
  89. title: '销售合同(sale contract)',
  90. align: 'center',
  91. dataIndex: 'saleContract',
  92. slots: { customRender: 'jumpTo' },
  93. },
  94. {
  95. title: '签单/提单(sign/bill of lading)',
  96. align: 'center',
  97. dataIndex: 'sign',
  98. width: 300,
  99. slots: { customRender: 'signFile' },
  100. },
  101. {
  102. title: '价税合计(tax money)',
  103. align: 'center',
  104. dataIndex: 'taxMoney',
  105. ellipsis: true,
  106. },
  107. {
  108. title: '盖章发票(stapm invoice)',
  109. align: 'center',
  110. dataIndex: 'stapmInvoice',
  111. slots: { customRender: 'viewFile' },
  112. },
  113. {
  114. title: '提交(submit)',
  115. align: 'center',
  116. dataIndex: 'submit_dictText',
  117. },
  118. {
  119. title: '作废(nullify)',
  120. align: 'center',
  121. dataIndex: 'close_dictText',
  122. },
  123. {
  124. title: '组织(organize)',
  125. align: 'center',
  126. dataIndex: 'organize',
  127. },
  128. {
  129. title: 'F号(F number)',
  130. align: 'center',
  131. dataIndex: 'fnumber',
  132. },
  133. {
  134. title: '创建时间',
  135. align:"center",
  136. dataIndex: 'createTime',
  137. width:180,
  138. },
  139. ];
  140. //子表表格配置
  141. export const saleInvoiceShipColumns: JVxeColumn[] = [
  142. {
  143. title: '船名(ship name)',
  144. key: 'shipName',
  145. type: JVxeTypes.normal,
  146. placeholder: '请输入${title}',
  147. defaultValue: '',
  148. },
  149. {
  150. title: '主机号(host number)',
  151. key: 'hostNumber',
  152. type: JVxeTypes.input,
  153. placeholder: '请输入${title}',
  154. defaultValue: '',
  155. },
  156. {
  157. title: '工程编号(project No)',
  158. key: 'projectNo',
  159. type: JVxeTypes.input,
  160. placeholder: '请输入${title}',
  161. defaultValue: '',
  162. },
  163. {
  164. title: '船厂(ship factory)',
  165. key: 'shipFactory',
  166. type: JVxeTypes.normal,
  167. placeholder: '请输入${title}',
  168. defaultValue: '',
  169. },
  170. {
  171. title: '船东(shipowner)',
  172. key: 'shipowner',
  173. type: JVxeTypes.normal,
  174. placeholder: '请输入${title}',
  175. defaultValue: '',
  176. },
  177. {
  178. title: '操作(operation)',
  179. key: 'action',
  180. width: '400px',
  181. // 固定在右侧
  182. fixed: 'right',
  183. // 对齐方式为居中
  184. align: 'center',
  185. // 组件类型定义为【插槽】
  186. type: JVxeTypes.slot,
  187. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  188. slotName: 'action',
  189. },
  190. ];
  191. export const saleInvoiceDetailColumns: JVxeColumn[] = [
  192. {
  193. title: '产品编码(product code)',
  194. key: 'productCode',
  195. type: JVxeTypes.normal,
  196. placeholder: '请输入${title}',
  197. width: '200px',
  198. defaultValue: '',
  199. },
  200. {
  201. title: '产品名称(product name)',
  202. key: 'chineseName',
  203. type: JVxeTypes.normal,
  204. placeholder: '请输入${title}',
  205. width: '200px',
  206. defaultValue: '',
  207. },
  208. {
  209. title: '数量(quantity)',
  210. key: 'quantity',
  211. type: JVxeTypes.inputNumber,
  212. validateRules: [{ required: true, message: '' }],
  213. placeholder: '请输入${title}',
  214. width: '200px',
  215. defaultValue: '',
  216. },
  217. {
  218. title: '单价(price)',
  219. key: 'taxPrice',
  220. type: JVxeTypes.inputNumber,
  221. validateRules: [{ required: true, message: '' }],
  222. placeholder: '请输入${title}',
  223. defaultValue: '',
  224. width: '200px',
  225. },
  226. {
  227. title: '金额(money)',
  228. key: 'taxMoney',
  229. type: JVxeTypes.normal,
  230. placeholder: '请输入${title}',
  231. width: '200px',
  232. defaultValue: '',
  233. statistics:['sum'],
  234. },
  235. {
  236. title: '税额(tax amount)',
  237. key: 'taxAmount',
  238. type: JVxeTypes.inputNumber,
  239. placeholder: '请输入${title}',
  240. width: '200px',
  241. defaultValue: '',
  242. statistics:['sum'],
  243. },
  244. {
  245. title: '备注(notes)',
  246. key: 'notes',
  247. type: JVxeTypes.input,
  248. placeholder: '请输入${title}',
  249. width: '200px',
  250. defaultValue: '',
  251. },
  252. {
  253. title: '操作(operation)',
  254. key: 'action',
  255. width: '200px',
  256. // 固定在右侧
  257. fixed: 'right',
  258. // 对齐方式为居中
  259. align: 'center',
  260. // 组件类型定义为【插槽】
  261. type: JVxeTypes.slot,
  262. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  263. slotName: 'action',
  264. },
  265. ];
  266. // 高级查询数据
  267. export const superQuerySchema = {
  268. status: { title: '状态(1-已报价,0-已报价)', order: 0, view: 'number', type: 'number' },
  269. otherStatus: { title: '其他状态(other status)', order: 2, view: 'text', type: 'string' },
  270. submit: { title: '提交(1是 0否)', order: 3, view: 'text', type: 'string' },
  271. billDate: { title: '单据日期(bill date)', order: 4, view: 'date', type: 'string' },
  272. billCode: { title: '询价单号(bill code)', order: 5, view: 'text', type: 'string' },
  273. inquiryProject: { title: '询价项目(inquiry project)', order: 6, view: 'text', type: 'string' },
  274. inquiryCustomer: { title: '询价客户(inquiry customer)', order: 7, view: 'text', type: 'string' },
  275. inquiryPlatform: { title: '询价平台(inquiry platform)', order: 8, view: 'text', type: 'string' },
  276. customerInquiryNumber: { title: '客户询价单号(customer inquiry number)', order: 9, view: 'text', type: 'string' },
  277. inquiryPeriodEnd: { title: '询价有效期(inquiry period)止', order: 10, view: 'date', type: 'string' },
  278. inquiryPeriodBegin: { title: '询价有效期(inquiry period)始', order: 11, view: 'date', type: 'string' },
  279. busynessType: { title: '业务类型(busyness type)', order: 12, view: 'text', type: 'string' },
  280. priority: { title: '优先级(priority)', order: 13, view: 'text', type: 'string' },
  281. productionClass: { title: '产品分类(production class)', order: 14, view: 'text', type: 'string' },
  282. model: { title: '机型(model)', order: 15, view: 'text', type: 'string' },
  283. maker: { title: '厂家(maker)', order: 16, view: 'text', type: 'string' },
  284. saleDepartment: { title: '销售部门(sale department)', order: 17, view: 'text', type: 'string' },
  285. salesman: { title: '业务员(salesman)', order: 18, view: 'text', type: 'string' },
  286. inquiryTeam: { title: '采购询价组(procurement inquiry team)', order: 19, view: 'text', type: 'string' },
  287. deliveryTime: { title: '交期(delivery time)', order: 20, view: 'datetime', type: 'string' },
  288. attachs: { title: '附件(attachs)', order: 21, view: 'text', type: 'string' },
  289. inquiryNotes: { title: '询价备注(inquiry notes)', order: 22, view: 'text', type: 'string' },
  290. //子表高级查询
  291. saleInquiryFormShip: {
  292. title: '销售询价单子表 - 船明细',
  293. view: 'table',
  294. fields: {
  295. shipId: { title: '船id', order: 0, view: 'text', type: 'string' },
  296. shipName: { title: '船名', order: 1, view: 'text', type: 'string' },
  297. hostNumber: { title: '主机号', order: 2, view: 'text', type: 'string' },
  298. projectNo: { title: '工程编号', order: 3, view: 'text', type: 'string' },
  299. shipFactory: { title: '船厂', order: 4, view: 'text', type: 'string' },
  300. shipowner: { title: '船东', order: 5, view: 'text', type: 'string' },
  301. },
  302. },
  303. saleInquiryFormProduct: {
  304. title: '销售询价单子表 - 产品明细',
  305. view: 'table',
  306. fields: {
  307. productId: { title: '产品id', order: 0, view: 'number', type: 'number' },
  308. deliveryTime: { title: '交期', order: 1, view: 'date', type: 'string' },
  309. productClass: { title: '产品分类', order: 2, view: 'text', type: 'string' },
  310. productCode: { title: '产品编码', order: 3, view: 'text', type: 'string' },
  311. chineseName: { title: '产品中文名', order: 4, view: 'text', type: 'string' },
  312. englishName: { title: '产品英文名', order: 5, view: 'text', type: 'string' },
  313. specifications: { title: '规格', order: 6, view: 'text', type: 'string' },
  314. model: { title: '型号', order: 7, view: 'text', type: 'string' },
  315. factory: { title: '厂家', order: 8, view: 'text', type: 'string' },
  316. qualityGrade: { title: '质量等级', order: 9, view: 'text', type: 'string' },
  317. quantity: { title: '数量', order: 10, view: 'number', type: 'number' },
  318. unit: { title: '单位', order: 11, view: 'text', type: 'string' },
  319. needShip: { title: '需要船检证书(1是 0否)', order: 12, view: 'text', type: 'string' },
  320. shipInspection: { title: '船检证书', order: 13, view: 'text', type: 'string' },
  321. notes: { title: '备注', order: 14, view: 'text', type: 'string' },
  322. },
  323. },
  324. };