IncidentTicketModalDetail.vue 33 KB

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