IncidentTicketModalDetail.vue 26 KB

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