IncidentTicketModal.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. <template>
  2. <a-modal
  3. title="编辑"
  4. width="85%"
  5. :visible="visible"
  6. :maskClosable="false"
  7. :confirmLoading="confirmLoading"
  8. @ok="handleOk"
  9. @cancel="handleCancel"
  10. destroyOnClose
  11. >
  12. <a-spin :spinning="confirmLoading">
  13. <!-- 主表单区域 -->
  14. <div class="table-page-search-wrapper">
  15. <div >
  16. <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules" labelAlign="right">
  17. <a-row :gutter="24">
  18. <a-col :span="8" >
  19. <a-form-model-item label="日期" prop="accidentData" >
  20. <a-input v-model="formState.accidentData" placeholder="请输入" readOnly></a-input>
  21. </a-form-model-item>
  22. </a-col>
  23. <a-col :span="8" >
  24. <a-form-model-item label="质量事故单主题" prop="accidentTheme">
  25. <a-input v-model="formState.accidentTheme" placeholder="请输入" readOnly></a-input>
  26. </a-form-model-item>
  27. </a-col>
  28. <a-col :span="8">
  29. <a-form-model-item label="质量事故单号" prop="accidentNumber">
  30. <a-input v-model="formState.accidentNumber" placeholder="请输入" readOnly></a-input>
  31. </a-form-model-item>
  32. </a-col>
  33. </a-row>
  34. <a-row :gutter="24">
  35. <a-col :span="8" >
  36. <a-form-model-item label="客户" prop="customer" >
  37. <a-input v-model="formState.customer" placeholder="请输入" readOnly></a-input>
  38. </a-form-model-item>
  39. </a-col>
  40. <a-col :span="8" >
  41. <a-form-model-item label="工厂(事故发生地)" prop="factory">
  42. <a-input v-model="formState.factory" placeholder="请输入" readOnly></a-input>
  43. </a-form-model-item>
  44. </a-col>
  45. <a-col :span="8" >
  46. <a-form-model-item label="责任单位" prop="responsibilityCompany">
  47. <a-input v-model="formState.responsibilityCompany" placeholder="请输入" readOnly></a-input>
  48. </a-form-model-item>
  49. </a-col>
  50. </a-row>
  51. <a-divider />
  52. <a-row :gutter="24">
  53. <a-col :span="6" >
  54. <a-form-model-item label="责任人1" prop="responsibilityPerson1" >
  55. <j-search-select-tag v-model="formState.responsibilityPerson1" placeholder=""
  56. dict="sys_user,realname,username" @search="searchName" :disabled="true"/>
  57. </a-form-model-item>
  58. </a-col>
  59. <a-col :span="6" >
  60. <a-form-model-item label="责任人2" prop="responsibilityPerson2" >
  61. <j-search-select-tag v-model="formState.responsibilityPerson2" placeholder=""
  62. dict="sys_user,realname,username" @search="searchName" :disabled="true"/>
  63. </a-form-model-item>
  64. </a-col>
  65. <a-col :span="6" >
  66. <a-form-model-item label="责任人3" prop="responsibilityPerson3">
  67. <j-search-select-tag v-model="formState.responsibilityPerson3" placeholder=""
  68. dict="sys_user,realname,username" @search="searchName" :disabled="true"/>
  69. </a-form-model-item>
  70. </a-col>
  71. <a-col :span="6" >
  72. <a-form-model-item label="责任人4" prop="responsibilityPerson4">
  73. <j-search-select-tag v-model="formState.responsibilityPerson4" placeholder=""
  74. dict="sys_user,realname,username" @search="searchName" :disabled="true"/>
  75. </a-form-model-item>
  76. </a-col>
  77. </a-row>
  78. <a-row :gutter="24">
  79. <a-col :span="6" >
  80. <a-form-model-item label="金额1" prop="sum1" >
  81. <a-input v-model="formState.sum1" placeholder="请输入" readOnly></a-input>
  82. </a-form-model-item>
  83. </a-col>
  84. <a-col :span="6" >
  85. <a-form-model-item label="金额2" prop="sum2" >
  86. <a-input v-model="formState.sum2" placeholder="请输入" readOnly></a-input>
  87. </a-form-model-item>
  88. </a-col>
  89. <a-col :span="6" >
  90. <a-form-model-item label="金额3" prop="sum3">
  91. <a-input v-model="formState.sum3" placeholder="请输入" readOnly></a-input>
  92. </a-form-model-item>
  93. </a-col>
  94. <a-col :span="6" >
  95. <a-form-model-item label="金额4" prop="sum4">
  96. <a-input v-model="formState.sum4" placeholder="请输入" readOnly></a-input>
  97. </a-form-model-item>
  98. </a-col>
  99. </a-row>
  100. <a-divider />
  101. <a-row :gutter="24">
  102. <!-- <a-col :span="8" >
  103. <a-form-model-item label="币种" prop="moneyType">
  104. <a-input v-model="formState.moneyType" placeholder="请输入" readOnly></a-input>
  105. </a-form-model-item>
  106. </a-col> -->
  107. <a-col :span="8" >
  108. <a-form-model-item label="总金额" prop="totalMoney" >
  109. <a-input v-model="formState.totalMoney" placeholder="请输入" readOnly></a-input>
  110. </a-form-model-item>
  111. </a-col>
  112. <a-col :span="8" >
  113. <a-form-model-item label="业务类型" prop="businessType">
  114. <a-input v-model="formState.businessType" placeholder="请输入" readOnly></a-input>
  115. </a-form-model-item>
  116. </a-col>
  117. </a-row>
  118. <a-row :gutter="24">
  119. <a-col :span="8" >
  120. <a-form-model-item label="成衣销售订单号" prop="garmentSalesOrder">
  121. <a-input v-model="formState.garmentSalesOrder" placeholder="请输入" readOnly></a-input>
  122. </a-form-model-item>
  123. </a-col>
  124. <a-col :span="8" >
  125. <a-form-model-item label="款号" prop="styleNumber" >
  126. <a-input v-model="formState.styleNumber" placeholder="请输入" readOnly></a-input>
  127. </a-form-model-item>
  128. </a-col>
  129. <a-col :span="8" >
  130. <a-form-model-item label="物料" prop="material">
  131. <a-input v-model="formState.material" placeholder="请输入" readOnly></a-input>
  132. </a-form-model-item>
  133. </a-col>
  134. </a-row>
  135. <a-row :gutter="24">
  136. <a-col :span="8" >
  137. <a-form-model-item label="计划员" prop="planPersonnel">
  138. <a-input v-model="formState.planPersonnel" placeholder="请输入" readOnly></a-input>
  139. </a-form-model-item>
  140. </a-col>
  141. <a-col :span="8" >
  142. <a-form-model-item label="业务员" prop="businessPeople" >
  143. <j-search-select-tag v-model="formState.businessPeople" placeholder=""
  144. dict="sys_user,realname,username" @search="searchName" :disabled="true"/>
  145. </a-form-model-item>
  146. </a-col>
  147. <a-col :span="8" >
  148. <a-form-model-item label="QC" prop="qualityControl">
  149. <j-search-select-tag v-model="formState.qualityControl" placeholder=""
  150. dict="sys_user,realname,username" @search="searchName" :disabled="true"/>
  151. </a-form-model-item>
  152. </a-col>
  153. </a-row>
  154. <a-row :gutter="24">
  155. <a-col :span="24" style="height: 290px;">
  156. <a-form-model-item label="情况说明" prop="presentationCondition" class="fff">
  157. <a-input v-model="formState.presentationCondition" type="textarea" placeholder="请输入" readOnly></a-input>
  158. </a-form-model-item>
  159. </a-col>
  160. </a-row>
  161. </a-form-model>
  162. </div>
  163. <!-- 子表单区域 -->
  164. <!-- <a-button type="primary" @click="addList" style="margin-bottom: 1%;">增行</a-button> -->
  165. <a-table
  166. bordered
  167. :columns="incidentTicketChildrenTable.columns"
  168. :data-source="incidentTicketChildrenTable.dataSource"
  169. :loading="incidentTicketChildrenTable.loading"
  170. :scroll="{x: 1200,y:300 }"
  171. :pagination="false"
  172. >
  173. <!-- 自定义表头 -->
  174. <!-- <span slot="zhanghaoIdTitle" class="form-table-heard">
  175. 账套号
  176. </span> -->
  177. <span slot="exchangeRateTitle" class="form-table-heard">
  178. 汇率
  179. </span>
  180. <span slot="practicalSumTitle" class="form-table-heard">
  181. 实际事故金额
  182. </span>
  183. <!-- 汇率 -->
  184. <span slot="exchangeRate" slot-scope="text, record, index">
  185. <a-input placeholder="请输入" v-model="record.exchangeRate" @change="changeExchangeRate(record,index)"/>
  186. </span>
  187. <!-- 实际事故金额 -->
  188. <span slot="practicalSum" slot-scope="text, record, index">
  189. <a-input placeholder="请输入" v-model="record.practicalSum" @blur="changepracticalSum(record)"/>
  190. </span>
  191. <!-- 币种 -->
  192. <span slot="moneyType" slot-scope="text, record, index">
  193. <j-dict-select-tag
  194. v-model="record.moneyType"
  195. placeholder="请选择币种"
  196. :triggerChange="true"
  197. dictCode="money-type"
  198. />
  199. </span>
  200. <!-- U8生成运费发票号 -->
  201. <span slot="u8Invoice" slot-scope="text, record, index">
  202. <a-input placeholder="请输入" v-model="record.u8Invoice" disabled="true"/>
  203. </span>
  204. <!-- 账套号 -->
  205. <span slot="zhanghaoId" slot-scope="text, record, index">
  206. <a-select v-model="record.zhanghaoId" @change="handleChange(record,index)" style="width: 100%;">
  207. <a-select-option value="101">101</a-select-option>
  208. <a-select-option value="102">102</a-select-option>
  209. <a-select-option value="103">103</a-select-option>
  210. </a-select>
  211. </span>
  212. <!-- 备注 -->
  213. <span slot="remark" slot-scope="text, record, index">
  214. <a-input placeholder="请输入" v-model="record.remark" />
  215. </span>
  216. </a-table>
  217. <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
  218. <a-row :gutter="24">
  219. <a-col :span="12" >
  220. <a-form-model-item label="附件上传" prop="accessory" class="ff">
  221. <j-upload v-model="accessory" :disabled="true"></j-upload>
  222. </a-form-model-item>
  223. </a-col>
  224. <a-col :span="12" >
  225. <a-form-model-item label="工厂签章" prop="factorySignature" class="ff">
  226. <j-upload v-model="factorySignature" :disabled="true"></j-upload>
  227. </a-form-model-item>
  228. </a-col>
  229. </a-row>
  230. <a-row :gutter="24">
  231. <a-col :span="24" style="height: 230px;">
  232. <a-form-model-item label="财务备注" prop="financeRemark" class="caiwu" >
  233. <a-input v-model="formState.financeRemark" type="textarea" placeholder="请输入"></a-input>
  234. </a-form-model-item>
  235. </a-col>
  236. </a-row>
  237. <a-row :gutter="24">
  238. <a-col :span="10">
  239. <a-form-model-item label="财务添加附件" prop="accessory2" class="ff">
  240. <j-upload v-model="accessory2" ></j-upload>
  241. <!-- <a-input v-model="formState.accessory2" placeholder="请输入"></a-input> -->
  242. </a-form-model-item>
  243. </a-col>
  244. <a-col :span="8">
  245. <a-form-model-item label="U8订单备注" prop="orderRemarks">
  246. <a-input maxlength="200" v-model="formState.orderRemarks" placeholder="请输入" ></a-input>
  247. </a-form-model-item>
  248. </a-col>
  249. <a-col :span="6">
  250. <a-form-model-item label="通知人" prop="Noticer">
  251. <a-input v-model="formState.Noticer" placeholder="请输入"></a-input>
  252. </a-form-model-item>
  253. </a-col>
  254. </a-row>
  255. <a-row :gutter="24">
  256. <a-col :span="10" >
  257. <a-form-model-item label="填报人" prop="informant">
  258. <a-input v-model="formState.informant" placeholder="请输入" readOnly></a-input>
  259. </a-form-model-item>
  260. </a-col>
  261. <a-col :span="8" >
  262. <a-form-model-item label="部门" prop="department">
  263. <a-input v-model="formState.department" placeholder="请输入" readOnly></a-input>
  264. </a-form-model-item>
  265. </a-col>
  266. </a-row>
  267. </a-form-model>
  268. <!-- <j-editable-table
  269. :ref="refKeys[0]"
  270. :loading="incidentTicketChildrenTable.loading"
  271. :columns="incidentTicketChildrenTable.columns"
  272. :dataSource="incidentTicketChildrenTable.dataSource"
  273. :maxHeight="300"
  274. :rowNumber="true"
  275. :rowSelection="true"
  276. :actionButton="true"/> -->
  277. <!-- <div class="table-page-search-wrapper">
  278. <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
  279. <a-row :gutter="24">
  280. <a-col :md="24" :sm="8">
  281. <a-form-model-item label="财务备注" class="nresume" style="height:100px !important">
  282. <a-input type="textarea" placeholder="请输入" v-model="formState.demo"/>
  283. </a-form-model-item>
  284. </a-col>
  285. </a-row>
  286. </a-form-model>
  287. </div> -->
  288. <!-- </a-tab-pane> -->
  289. </div>
  290. </a-spin>
  291. </a-modal>
  292. </template>
  293. <script>
  294. import pick from 'lodash.pick'
  295. import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
  296. import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
  297. import { validateDuplicateValue } from '@/utils/util'
  298. import JDictSelectTag from "@/components/dict/JDictSelectTag"
  299. import JUpload from '@/components/jeecg/JUpload'
  300. import { putAction,getAction } from '@/api/manage'
  301. import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
  302. export default {
  303. name: 'IncidentTicketModal',
  304. mixins: [JEditableTableMixin],
  305. components: {
  306. JDictSelectTag,
  307. JUpload,
  308. JSearchSelectTag
  309. },
  310. data() {
  311. return {
  312. labelCol: {
  313. span: 8
  314. },
  315. wrapperCol: {
  316. span: 16
  317. },
  318. labelCol2: {
  319. span: 3
  320. },
  321. wrapperCol2: {
  322. span: 20
  323. },
  324. formState:{},
  325. // 新增时子表默认添加几行空数据
  326. addDefaultRowNum: 1,
  327. validatorRules: {
  328. financeRemark:[{required: true, message: '财务备注不能为空!'}],
  329. },
  330. refKeys: ['incidentTicketChildren', ],
  331. tableKeys:['incidentTicketChildren', ],
  332. activeKey: 'incidentTicketChildren',
  333. accessory2:[],
  334. accessory:[],
  335. factorySignature:[],
  336. // 森_工厂质量事故单-子表
  337. incidentTicketChildrenTable: {
  338. loading: false,
  339. dataSource: [],
  340. columns: [
  341. {
  342. title: '计划单号',
  343. align: "center",
  344. dataIndex: 'planNumber',
  345. width: '7%',
  346. },
  347. {
  348. title: '事故类型',
  349. align: "center",
  350. dataIndex: 'accidentType',
  351. width: '7%',
  352. // scopedSlots: { customRender: 'accidentType' },
  353. },
  354. {
  355. title: '币种',
  356. align: "center",
  357. dataIndex: 'moneyType',
  358. width: '8%',
  359. // scopedSlots: { customRender: 'moneyType' },
  360. },
  361. {
  362. title: '事故金额',
  363. align: "center",
  364. dataIndex: 'accidentSum',
  365. width: '7%',
  366. // scopedSlots: { customRender: 'accidentSum' },
  367. },
  368. {
  369. // title: '汇率',
  370. align: "center",
  371. dataIndex: 'exchangeRate',
  372. width: '10%',
  373. scopedSlots: { customRender: 'exchangeRate' },
  374. slots:{title:'exchangeRateTitle'},
  375. },
  376. {
  377. // title: '实际事故金额',
  378. align: "center",
  379. dataIndex: 'practicalSum',
  380. width: '7%',
  381. scopedSlots: { customRender: 'practicalSum' },
  382. slots:{title:'practicalSumTitle'},
  383. },
  384. {
  385. title: 'U8生成运费发票号',
  386. align: "center",
  387. dataIndex: 'u8Invoice',
  388. width: '9%',
  389. scopedSlots: { customRender: 'u8Invoice' },
  390. },
  391. {
  392. title: '账套号',
  393. align: "center",
  394. dataIndex: 'zhanghaoId',
  395. width: '9%',
  396. scopedSlots: { customRender: 'zhanghaoId' },
  397. // slots:{title:'zhanghaoIdTitle'},
  398. },
  399. {
  400. title: '备注',
  401. align: "center",
  402. dataIndex: 'remark',
  403. width: '20%',
  404. scopedSlots: { customRender: 'remark' },
  405. },
  406. ]
  407. },
  408. url: {
  409. add: "/oa/incidentTicket/add",
  410. edit: "/oa/incidentTicket/edit",
  411. incidentTicketChildren: {
  412. list: '/oa/incidentTicket/queryIncidentTicketChildrenByMainId'
  413. },
  414. }
  415. }
  416. },
  417. methods: {
  418. getHeaderList(id){
  419. getAction('/oa/incidentTicket/queryById', {id:id}).then((res) => {
  420. if(res.success){
  421. var zhuId = '' //主表id
  422. this.formState=res.result //详情
  423. this.accessory2 = this.formState.accessory2?JSON.parse(this.formState.accessory2):[]
  424. var accessory2Z =[]
  425. this.accessory2.map(item=>{
  426. accessory2Z.push(item.url)
  427. })
  428. this.accessory2 = accessory2Z
  429. this.accessory = this.formState.accessory?JSON.parse(this.formState.accessory):[]
  430. var accessoryZ=[]
  431. this.accessory.map(item =>{
  432. accessoryZ.push(item.url)
  433. })
  434. this.accessory =accessoryZ
  435. this.factorySignature = this.formState.factorySignature?JSON.parse(this.formState.factorySignature):[]
  436. var factorySignatureZ=[]
  437. this.factorySignature.map(item =>{
  438. factorySignatureZ.push(item.url)
  439. })
  440. this.factorySignature =factorySignatureZ
  441. zhuId = res.result.id
  442. this.getTable(zhuId)
  443. this.getNotifier(zhuId)
  444. }else{
  445. this.$message.warning(res.message)
  446. }
  447. })
  448. },
  449. getTable(id){
  450. getAction('/oa/incidentTicket/queryIncidentTicketChildrenByMainId', {id:id}).then((res) => {
  451. if(res.success){
  452. this.incidentTicketChildrenTable.dataSource = res.result
  453. this.incidentTicketChildrenTable.dataSource.map(item=>{
  454. if(item.practicalSum==''||!item.practicalSum){
  455. item.practicalSum = item.accidentSum
  456. }
  457. if(item.exchangeRate==''||!item.exchangeRate){
  458. item.exchangeRate = '1'
  459. }
  460. })
  461. }else{
  462. this.$message.warning(res.message)
  463. }
  464. })
  465. },
  466. getNotifier(id){
  467. getAction('/oa/incidentTicketMsg/queryByMainId', {id:id}).then((res) => {
  468. if(res.success){
  469. var noticeList =[]
  470. res.result.map(item=>{
  471. if(item.confirm != null && item.confirm != '' && item.confirm != '否'){
  472. noticeList.push(item.userName+'('+item.confirm+')')
  473. }else{
  474. noticeList.push(item.userName+'')
  475. }
  476. })
  477. this.formState.Noticer = noticeList.toString()
  478. console.log(this.formState.Noticer)
  479. this.$forceUpdate()
  480. }
  481. })
  482. },
  483. handleOk(){
  484. this.formState.accessory2 = (this.accessory2.length!==0&&this.accessory2)?[{"type":"file","name":this.accessory2,"status":"done","uid":1673507319016,"url":"http://220.191.168.86:18087/jeecg-boot/sys/common/static/"+this.accessory2}]:[]
  485. this.formState.accessory2 = JSON.stringify(this.formState.accessory2)
  486. var addData = 'yes'
  487. this.incidentTicketChildrenTable.dataSource.every(item=>{
  488. // if(item.zhanghaoId==''||!item.zhanghaoId){
  489. // this.$message.warning('请选择账套号!')
  490. // addData = 'no'
  491. // return false;
  492. // }
  493. if(item.exchangeRate=='' || !item.exchangeRate){
  494. this.$message.warning('请填写汇率!')
  495. addData = 'no'
  496. return false;
  497. }
  498. if(item.practicalSum=='' || !item.practicalSum){
  499. this.$message.warning('请填写实际事故金额!')
  500. addData = 'no'
  501. return false;
  502. }
  503. return true
  504. })
  505. this.$refs.form.validate(valid => {
  506. if (valid) {
  507. if(addData=='yes'){
  508. var obj = this.formState
  509. obj.incidentTicketChildrenList = this.incidentTicketChildrenTable.dataSource
  510. putAction('/oa/incidentTicket/edit', obj).then((res) => {
  511. if(res.success){
  512. this.$message.success('编辑成功')
  513. this.handleCancel()
  514. this.$emit('close')
  515. }else{
  516. this.$message.warning(res.message)
  517. }
  518. })
  519. }
  520. }
  521. })
  522. },
  523. // 改变账套号
  524. handleChange(record,index){
  525. if(index==0){
  526. this.incidentTicketChildrenTable.dataSource.map(item=>{
  527. item.zhanghaoId = record.zhanghaoId
  528. })
  529. }
  530. },
  531. changepracticalSum(record){
  532. record.practicalSum = Number(record.practicalSum).toFixed(2)
  533. this.$forceUpdate()
  534. },
  535. changeExchangeRate(record,index){
  536. if(index == 0){
  537. this.incidentTicketChildrenTable.dataSource.map(item=>{
  538. item.exchangeRate = record.exchangeRate
  539. })
  540. }
  541. },
  542. //关闭
  543. handleCancel(){
  544. this.incidentTicketChildrenTable.dataSource =[]
  545. this.formState = {}
  546. this.visible = false
  547. this.$emit('close')
  548. },
  549. // getAllTable() {
  550. // let values = this.tableKeys.map(key => getRefPromise(this, key))
  551. // return Promise.all(values)
  552. // },
  553. /** 调用完edit()方法之后会自动调用此方法 */
  554. // editAfter() {
  555. // let fieldval = pick(this.model,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren')
  556. // this.$nextTick(() => {
  557. // this.form.setFieldsValue(fieldval)
  558. // })
  559. // // 加载子表数据
  560. // if (this.model.id) {
  561. // let params = { id: this.model.id }
  562. // this.requestSubTableData(this.url.incidentTicketChildren.list, params, this.incidentTicketChildrenTable)
  563. // }
  564. // },
  565. /** 整理成formData */
  566. classifyIntoFormData(allValues) {
  567. let main = Object.assign(this.model, allValues.formValue)
  568. return {
  569. ...main, // 展开
  570. incidentTicketChildrenList: allValues.tablesValue[0].values,
  571. }
  572. },
  573. validateError(msg){
  574. this.$message.error(msg)
  575. },
  576. popupCallback(row){
  577. this.form.setFieldsValue(pick(row,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren'))
  578. },
  579. }
  580. }
  581. </script>
  582. <style lang="less" scoped>
  583. /deep/ .ant-table-wrapper{
  584. margin-bottom: 2%;
  585. }
  586. /deep/ .nresume .ant-input{
  587. height: 100px !important;
  588. }
  589. /deep/ .ff .ant-form-item-control {
  590. display: contents;
  591. }
  592. /deep/ .ant-divider-horizontal{
  593. margin: 10px 0;
  594. }
  595. /deep/.table-page-search-wrapper .ant-form-inline .ant-form-item>.ant-form-item-label{
  596. width: 118px;
  597. }
  598. /deep/ .fff .ant-input{
  599. height: 280px !important;
  600. }
  601. /deep/ .caiwu .ant-input{
  602. height: 226px !important;
  603. }
  604. /deep/.ant-table td { white-space: nowrap; }
  605. .form-table-heard:before {
  606. content: '*';
  607. color: red;
  608. }
  609. /deep/ .ant-table td {
  610. white-space: break-spaces !important;
  611. word-break: break-word;
  612. }
  613. /deep/.ant-select{
  614. width: 100%;
  615. }
  616. /deep/.ant-select-selection--single{
  617. width: 100%;
  618. }
  619. </style>