plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1515 lines
51 KiB

2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'申请单号'">
  5. <el-input v-model="searchData.applyNo" style="width: 160px"></el-input>
  6. </el-form-item>
  7. <el-form-item label="申请日期">
  8. <el-date-picker
  9. value-format="yyyy-MM-dd"
  10. style="width: 100%"
  11. v-model="searchData.startDate"
  12. type="date"
  13. placeholder="开始日期">
  14. </el-date-picker>
  15. </el-form-item>
  16. <el-form-item label="到">
  17. <el-date-picker
  18. value-format="yyyy-MM-dd"
  19. style="width: 100%"
  20. v-model="searchData.endDate"
  21. type="date"
  22. placeholder="结束日期">
  23. </el-date-picker>
  24. </el-form-item>
  25. <el-form-item label=" ">
  26. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  27. <!-- <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>-->
  28. <download-excel
  29. :fields="fields()"
  30. :data="exportData"
  31. type="xls"
  32. :name="exportName"
  33. :header="exportHeader"
  34. :footer="exportFooter"
  35. :fetch="createExportData"
  36. :before-generate="startDownload"
  37. :before-finish="finishDownload"
  38. worksheet="导出信息"
  39. class="el-button el-button--primary el-button--medium">
  40. {{ '导出' }}
  41. </download-excel>
  42. </el-form-item>
  43. </el-form>
  44. <el-table
  45. :height="height"
  46. :data="dataList1"
  47. border
  48. ref="mainTable"
  49. @row-click="changeData"
  50. highlight-current-row
  51. v-loading="dataListLoading"
  52. style="width: 100%;">
  53. <el-table-column
  54. header-align="center"
  55. align="center"
  56. width="150"
  57. fixed="right"
  58. label="操作">
  59. <template slot-scope="scope">
  60. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="comfirmApply(scope.row)">下达</a>
  61. <a type="text" size="small" v-if="scope.row.status=='审批中'" @click="editModal(scope.row)">审批</a>
  62. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="cancelApply(scope.row)">取消申请</a>
  63. </template>
  64. </el-table-column>
  65. <el-table-column
  66. v-for="(item,index) in columnList1" :key="index"
  67. :sortable="item.columnSortable"
  68. :prop="item.columnProp"
  69. :header-align="item.headerAlign"
  70. :show-overflow-tooltip="item.showOverflowTooltip"
  71. :align="item.align"
  72. :fixed="item.fixed==''?false:item.fixed"
  73. :min-width="item.columnWidth"
  74. :label="item.columnLabel">
  75. <template slot-scope="scope">
  76. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  77. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  78. style="width: 100px; height: 80px"/></span>
  79. </template>
  80. </el-table-column>
  81. </el-table>
  82. <el-pagination
  83. @size-change="sizeChangeHandle"
  84. @current-change="currentChangeHandle"
  85. :current-page="pageIndex"
  86. :page-sizes="[20, 50, 100, 1000]"
  87. :page-size="pageSize"
  88. :total="totalPage"
  89. layout="total, sizes, prev, pager, next, jumper">
  90. </el-pagination>
  91. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  92. <el-tab-pane label="工具明细" name="detail">
  93. <el-table
  94. :data="detailList"
  95. height="240"
  96. border
  97. v-loading="dataListLoading"
  98. style="width: 100%; ">
  99. <el-table-column
  100. v-for="(item,index) in columnList2" :key="index"
  101. :sortable="item.columnSortable"
  102. :prop="item.columnProp"
  103. :header-align="item.headerAlign"
  104. :show-overflow-tooltip="item.showOverflowTooltip"
  105. :align="item.align"
  106. :fixed="item.fixed==''?false:item.fixed"
  107. :min-width="item.columnWidth"
  108. :label="item.columnLabel">
  109. <template slot-scope="scope">
  110. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  111. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  112. style="width: 100px; height: 80px"/></span>
  113. </template>
  114. </el-table-column>
  115. <el-table-column
  116. header-align="center"
  117. align="center"
  118. width="120"
  119. fixed="right"
  120. label="操作">
  121. <template slot-scope="scope">
  122. <a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
  123. </template>
  124. </el-table-column>
  125. <!-- <el-table-column-->
  126. <!-- fixed="right"-->
  127. <!-- header-align="center"-->
  128. <!-- align="center"-->
  129. <!-- width="100"-->
  130. <!-- label="操作">-->
  131. <!-- <template slot-scope="scope">-->
  132. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  133. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  134. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  135. <!-- </template>-->
  136. <!-- </el-table-column>-->
  137. </el-table>
  138. </el-tab-pane>
  139. <el-tab-pane label="附件信息" name="down">
  140. <oss-components height="25vh" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  141. <!--文件上传-->
  142. <!-- <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">-->
  143. <!-- <el-form :inline="true" label-position="top" style="margin-top: 0px">-->
  144. <!-- <el-button type="primary" @click="addUploadFileModal()">上传文件</el-button>-->
  145. <!-- </el-form>-->
  146. <!-- </el-form>-->
  147. <!-- <el-table-->
  148. <!-- :data="fileContentList"-->
  149. <!-- height="240"-->
  150. <!-- border-->
  151. <!-- v-loading="dataListLoading"-->
  152. <!-- style="width: 100%; ">-->
  153. <!-- <el-table-column-->
  154. <!-- v-for="(item,index) in columnFileContentArray" :key="index"-->
  155. <!-- :sortable="item.columnSortable"-->
  156. <!-- :prop="item.columnProp"-->
  157. <!-- :header-align="item.headerAlign"-->
  158. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  159. <!-- :align="item.align"-->
  160. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  161. <!-- :min-width="item.columnWidth"-->
  162. <!-- :label="item.columnLabel">-->
  163. <!-- <template slot-scope="scope">-->
  164. <!-- <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>-->
  165. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  166. <!-- style="width: 100px; height: 80px"/></span>-->
  167. <!-- </template>-->
  168. <!-- </el-table-column>-->
  169. <!-- <el-table-column-->
  170. <!-- fixed="right"-->
  171. <!-- header-align="center"-->
  172. <!-- align="center"-->
  173. <!-- width="100"-->
  174. <!-- label="操作">-->
  175. <!-- <template slot-scope="scope">-->
  176. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  177. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  178. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  179. <!-- </template>-->
  180. <!-- </el-table-column>-->
  181. <!-- </el-table>-->
  182. </el-tab-pane>
  183. <!-- 审批信息 -->
  184. <el-tab-pane label="审批信息" name="approvalInformation">
  185. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
  186. </el-tab-pane>
  187. <el-tab-pane label="处理信息" name="tab4">
  188. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  189. <!-- <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>-->
  190. <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>
  191. </el-form>
  192. <el-form label-position="top" :model="currentRow" >
  193. <el-row :gutter="15">
  194. <el-col :span="6">
  195. <el-form-item label="IFS PR编号" >
  196. <el-input v-model="currentRow.prNo" readonly></el-input>
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="18">
  200. <el-form-item label="备注" >
  201. <el-input v-model="currentRow.remark1" readonly></el-input>
  202. </el-form-item>
  203. </el-col>
  204. </el-row>
  205. <el-row :gutter="15" style="margin-top: 20px">
  206. <el-col :span="6">
  207. <el-form-item label="采购订单号" >
  208. <el-input v-model="currentRow.poNo" readonly ></el-input>
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="6">
  212. <el-form-item label="厂商名称" >
  213. <el-input v-model="currentRow.supplierName" readonly></el-input>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="6">
  217. <el-form-item label="总成本(元)" >
  218. <el-input v-model="currentRow.allCost" readonly></el-input>
  219. </el-form-item>
  220. </el-col>
  221. </el-row>
  222. <el-row :gutter="15" style="margin-top: 0px">
  223. <el-col :span="24">
  224. <el-form-item label="备注" >
  225. <el-input v-model="currentRow.remark2" readonly></el-input>
  226. </el-form-item>
  227. </el-col>
  228. </el-row>
  229. </el-form>
  230. </el-tab-pane>
  231. </el-tabs>
  232. <el-dialog
  233. width="800px" v-drag
  234. :title="'刀模申请审批'"
  235. :close-on-click-modal="false"
  236. :visible.sync="visible">
  237. <el-form :inline="true" label-position="top" label-width="100px" >
  238. <el-form-item :label="'申请编号'">
  239. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  240. </el-form-item>
  241. <el-form-item :label="'申请人'" required="required">
  242. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  243. </el-form-item>
  244. <el-form-item :label="'申请日期'" required="required">
  245. <el-date-picker
  246. value-format="yyyy-MM-dd"
  247. style="width: 100%"
  248. v-model="dataForm.applyDate"
  249. type="date"
  250. disabled
  251. placeholder="结束日期">
  252. </el-date-picker>
  253. </el-form-item>
  254. <el-form-item :label="'申请总数'">
  255. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  256. </el-form-item>
  257. </el-form>
  258. <el-form :inline="true" label-position="top" label-width="100px" >
  259. <el-form-item :label="'申请原因'">
  260. <el-input v-model="dataForm.applyReason" style="width: 770px" ></el-input>
  261. </el-form-item>
  262. </el-form>
  263. <el-form :inline="true" label-position="top" label-width="100px" >
  264. <el-form-item :label="'备注'">
  265. <el-input v-model="dataForm.remark" style="width: 770px" ></el-input>
  266. </el-form-item>
  267. </el-form>
  268. <div class="rq">
  269. <el-table
  270. height="250"
  271. :data="toolData"
  272. border
  273. ref="toolTable"
  274. v-loading="dataListLoading"
  275. style="width: 100%;">
  276. <el-table-column
  277. v-for="(item,index) in columnList2" :key="index"
  278. :sortable="item.columnSortable"
  279. :prop="item.columnProp"
  280. :header-align="item.headerAlign"
  281. :show-overflow-tooltip="item.showOverflowTooltip"
  282. :align="item.align"
  283. :fixed="item.fixed==''?false:item.fixed"
  284. :min-width="item.columnWidth"
  285. :label="item.columnLabel">
  286. <template slot-scope="scope">
  287. <div v-if="item.columnProp !== 'applyQty' ">
  288. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  289. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  290. style="width: 100px; height: 80px"/></span>
  291. </div>
  292. <div v-else>
  293. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  294. style="width:98%"></el-input>
  295. </div>
  296. </template>
  297. </el-table-column>
  298. </el-table>
  299. </div>
  300. <span slot="footer" class="dialog-footer">
  301. <el-button type="primary" @click="saveData()">{{'保存'}}</el-button>
  302. <el-button type="primary" @click="visible = false">{{'取消'}}</el-button>
  303. <el-button v-if="dataForm.status === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  304. <el-button v-if="dataForm.status === '审批中' && dataForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
  305. </span>
  306. </el-dialog>
  307. <el-dialog
  308. width="600px" v-drag
  309. :title="'处理信息'"
  310. :close-on-click-modal="false"
  311. :visible.sync="modelFlag">
  312. <el-form label-position="top" >
  313. <el-row :gutter="15" >
  314. <el-col :span="6">
  315. <el-form-item label="IFS PR编号" >
  316. <el-input v-model="modelData.prNo" ></el-input>
  317. </el-form-item>
  318. </el-col>
  319. <el-col :span="18">
  320. <el-form-item label="备注" >
  321. <el-input v-model="modelData.remark1" ></el-input>
  322. </el-form-item>
  323. </el-col>
  324. </el-row>
  325. <el-row :gutter="15" style="margin-top: 20px" >
  326. <el-col :span="6">
  327. <el-form-item label="采购订单号" >
  328. <el-input v-model="modelData.poNo" ></el-input>
  329. </el-form-item>
  330. </el-col>
  331. <el-col :span="6">
  332. <el-form-item label="厂商名称" >
  333. <el-input v-model="modelData.supplierName" ></el-input>
  334. </el-form-item>
  335. </el-col>
  336. <el-col :span="6">
  337. <el-form-item label="总成本(元)" >
  338. <el-input v-model="modelData.allCost" type="number" ></el-input>
  339. </el-form-item>
  340. </el-col>
  341. </el-row>
  342. <el-row :gutter="15" style="margin-top: 0px">
  343. <el-col :span="24">
  344. <el-form-item label="备注" >
  345. <el-input v-model="modelData.remark2" ></el-input>
  346. </el-form-item>
  347. </el-col>
  348. </el-row>
  349. </el-form>
  350. <span slot="footer" class="dialog-footer">
  351. <el-button type="primary" @click="saveHeaderMessage()">{{'保存'}}</el-button>
  352. <el-button type="primary" @click="modelFlag = false">{{'取消'}}</el-button>
  353. </span>
  354. </el-dialog>
  355. <!-- 提交 -->
  356. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag" width="500px">
  357. <el-form :inline="true" label-position="top">
  358. <el-form-item :label="'驳回意见'">
  359. <el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit style="width: 479px;height: 30px"></el-input>
  360. </el-form-item>
  361. </el-form>
  362. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  363. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  364. <el-button type="primary" @click="submitModalFlag = false">取消</el-button>
  365. </el-footer>
  366. </el-dialog>
  367. <!-- 上传文件的modal -->
  368. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  369. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  370. </div>
  371. </template>
  372. <script>
  373. import {
  374. customerInformationSearch, // 客户信息列表查询`
  375. } from '@/api/customer/customerInformation.js'
  376. import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
  377. import Chooselist from '@/views/modules/common/Chooselist'
  378. import {searchProjectToolApplyHeader,
  379. searchProjectToolApplyDetail,
  380. comfirmProjectToolApply,
  381. cancelProjectToolApply,
  382. saveProjectHeaderMessage,
  383. editToolApplication,
  384. submitChange
  385. } from "@/api/tool/toolApply.js"
  386. import {
  387. deleteProjectFile,
  388. getFileContentList,
  389. downLoadProjectFile,
  390. getProjectPartNowBm,
  391. } from "@/api/project/project.js"
  392. import {
  393. getNodeAuthority, // 获取节点权限
  394. getApprovalList, // 查询审批信息
  395. } from '@/api/changeManagement/changeManagement.js'
  396. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  397. import OssComponents from "../oss/ossComponents";
  398. /*組件*/
  399. export default {
  400. components: {
  401. ApprovalInformation,
  402. OssComponents,
  403. Chooselist,
  404. projectUploadFile,
  405. },
  406. name: "null",
  407. data() {
  408. return {
  409. visible:false,
  410. fileContentList: [],
  411. activeName: 'detail',
  412. searchData:{
  413. page: 1,
  414. limit: 100,
  415. site:this.$store.state.user.site,
  416. applyNo:'',
  417. startDate:'',
  418. endDate:'',
  419. },
  420. toolData:[],
  421. dataForm:{
  422. site: '',
  423. applyNo: '',
  424. applyBy:'',
  425. applyDate:'',
  426. applySumQty:'',
  427. applyReason:'',
  428. remark:'',
  429. createBy:'',
  430. detailList:[],
  431. status: '',
  432. rejectOpinion: '',
  433. nodeConclusion: '',
  434. menuId: this.$route.meta.menuId,
  435. userName: this.$store.state.user.name,
  436. },
  437. modelData:{
  438. site:'',
  439. applyNo:'',
  440. prNo:'',
  441. remark1:'',
  442. poNo:'',
  443. supplierName:'',
  444. allCost:'',
  445. remark2:'',
  446. },
  447. modelFlag:false,
  448. currentRow:{},
  449. currentRow2:{},
  450. height: 200,
  451. dataList1:[],
  452. detailList:[],
  453. dataListLoading: false,
  454. // 导出 start
  455. exportData: [],
  456. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  457. exportHeader: ["项目清单"],
  458. exportFooter: [],
  459. exportList:[],
  460. // 导出 start
  461. exportData2: [],
  462. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  463. exportHeader2: ["项目客户联系人"],
  464. exportFooter2: [],
  465. exportList2:[],
  466. tagNo:'',
  467. tagNo2:'',
  468. pageIndex: 1,
  469. pageSize: 100,
  470. totalPage: 0,
  471. ossColumns:[
  472. {
  473. userId: this.$store.state.user.name,
  474. functionId: 103001,
  475. serialNumber: '103001Table2FileName',
  476. tableId: '103001Table2',
  477. tableName: '文件信息表',
  478. columnProp: 'fileName',
  479. headerAlign: 'center',
  480. align: 'center',
  481. columnLabel: '文件名称',
  482. columnHidden: false,
  483. columnImage: false,
  484. columnSortable: false,
  485. sortLv: 0,
  486. status: true,
  487. fixed: '',
  488. columnWidth: 140
  489. },
  490. {
  491. userId: this.$store.state.user.name,
  492. functionId: 103001,
  493. serialNumber: '103001Table2FileRemark',
  494. tableId: '103001Table2',
  495. tableName: '文件信息表',
  496. columnProp: 'fileRemark',
  497. headerAlign: 'center',
  498. align: 'center',
  499. columnLabel: '备注',
  500. columnHidden: false,
  501. columnImage: false,
  502. columnSortable: false,
  503. sortLv: 0,
  504. status: true,
  505. fixed: '',
  506. columnWidth: 240
  507. },
  508. // {
  509. // userId: this.$store.state.user.name,
  510. // functionId: 103001,
  511. // serialNumber: '103001Table2OrderRef3',
  512. // tableId: '103001Table2',
  513. // tableName: '文件信息表',
  514. // columnProp: 'orderRef3',
  515. // headerAlign: 'center',
  516. // align: 'center',
  517. // columnLabel: '文件描述',
  518. // columnHidden: false,
  519. // columnImage: false,
  520. // columnSortable: false,
  521. // sortLv: 0,
  522. // status: true,
  523. // fixed: '',
  524. // columnWidth: 120
  525. // },
  526. {
  527. userId: this.$store.state.user.name,
  528. functionId: 103001,
  529. serialNumber: '103001Table2CreateDate',
  530. tableId: '103001Table2',
  531. tableName: '文件信息表',
  532. columnProp: 'createDate',
  533. headerAlign: 'center',
  534. align: 'center',
  535. columnLabel: '上传时间',
  536. columnHidden: false,
  537. columnImage: false,
  538. columnSortable: false,
  539. sortLv: 0,
  540. status: true,
  541. fixed: '',
  542. columnWidth: 140
  543. },
  544. {
  545. userId: this.$store.state.user.name,
  546. functionId: 103001,
  547. serialNumber: '103001Table2CreatedBy',
  548. tableId: '103001Table2',
  549. tableName: '文件信息表',
  550. columnProp: 'createBy',
  551. headerAlign: 'center',
  552. align: 'center',
  553. columnLabel: '上传人',
  554. columnHidden: false,
  555. columnImage: false,
  556. columnSortable: false,
  557. sortLv: 0,
  558. status: true,
  559. fixed: '',
  560. columnWidth: 140
  561. }
  562. ],
  563. // 导出 end
  564. columnList1: [
  565. {
  566. userId: this.$store.state.user.name,
  567. functionId: 106002,
  568. serialNumber: '106002Table1Site',
  569. tableId: "106002Table1",
  570. tableName: "刀具申请主表",
  571. columnProp: "site",
  572. headerAlign: "center",
  573. align: "left",
  574. columnLabel: "工厂编码",
  575. columnHidden: false,
  576. columnImage: false,
  577. columnSortable: false,
  578. sortLv: 0,
  579. status: true,
  580. fixed: '',
  581. columnWidth: 70
  582. },
  583. {
  584. userId: this.$store.state.user.name,
  585. functionId: 106002,
  586. serialNumber: '106002Table1ApplyNo',
  587. tableId: "106002Table1",
  588. tableName: "刀具申请主表",
  589. columnProp: "applyNo",
  590. headerAlign: "center",
  591. align: "left",
  592. columnLabel: "申请单号",
  593. columnHidden: false,
  594. columnImage: false,
  595. columnSortable: false,
  596. sortLv: 0,
  597. status: true,
  598. fixed: '',
  599. columnWidth: 80
  600. },
  601. {
  602. userId: this.$store.state.user.name,
  603. functionId: 106002,
  604. serialNumber: '106002Table1ApplyBy',
  605. tableId: "106002Table1",
  606. tableName: "刀具申请主表",
  607. columnProp: "applyBy",
  608. headerAlign: "center",
  609. align: "left",
  610. columnLabel: "申请人",
  611. columnHidden: false,
  612. columnImage: false,
  613. columnSortable: false,
  614. sortLv: 0,
  615. status: true,
  616. fixed: '',
  617. columnWidth: 60
  618. },
  619. {
  620. userId: this.$store.state.user.name,
  621. functionId: 106002,
  622. serialNumber: '106002Table1Status',
  623. tableId: "106002Table1",
  624. tableName: "刀具申请主表",
  625. columnProp: "status",
  626. headerAlign: "center",
  627. align: "left",
  628. columnLabel: "状态",
  629. columnHidden: false,
  630. columnImage: false,
  631. columnSortable: false,
  632. sortLv: 0,
  633. status: true,
  634. fixed: '',
  635. columnWidth: 60
  636. },
  637. {
  638. userId: this.$store.state.user.name,
  639. functionId: 106002,
  640. serialNumber: '106002Table1ApplyDate',
  641. tableId: "106002Table1",
  642. tableName: "刀具申请主表",
  643. columnProp: "applyDate",
  644. headerAlign: "center",
  645. align: "left",
  646. columnLabel: "申请日期",
  647. columnHidden: false,
  648. columnImage: false,
  649. columnSortable: false,
  650. sortLv: 0,
  651. status: true,
  652. fixed: '',
  653. columnWidth: 80
  654. },
  655. {
  656. userId: this.$store.state.user.name,
  657. functionId: 106002,
  658. serialNumber: '106002Table1ApplyReason',
  659. tableId: "106002Table1",
  660. tableName: "刀具申请主表",
  661. columnProp: "applyReason",
  662. headerAlign: "center",
  663. align: "left",
  664. columnLabel: "申请原因",
  665. columnHidden: false,
  666. columnImage: false,
  667. columnSortable: false,
  668. sortLv: 0,
  669. status: true,
  670. fixed: '',
  671. columnWidth: 150
  672. },
  673. {
  674. userId: this.$store.state.user.name,
  675. functionId: 106002,
  676. serialNumber: '106002Table1Remark',
  677. tableId: "106002Table1",
  678. tableName: "刀具申请主表",
  679. columnProp: "remark",
  680. headerAlign: "center",
  681. align: "left",
  682. columnLabel: "申请备注",
  683. columnHidden: false,
  684. columnImage: false,
  685. columnSortable: false,
  686. sortLv: 0,
  687. status: true,
  688. fixed: '',
  689. columnWidth: 200
  690. },
  691. ],
  692. columnList2: [
  693. {
  694. userId: this.$store.state.user.name,
  695. functionId: 106002,
  696. serialNumber: '106002Table2SeqNo',
  697. tableId: '106002Table2',
  698. tableName: '工具申请明细',
  699. columnProp: 'seqNo',
  700. headerAlign: 'center',
  701. align: 'center',
  702. columnLabel: '序号',
  703. columnHidden: false,
  704. columnImage: false,
  705. columnSortable: false,
  706. sortLv: 0,
  707. status: true,
  708. fixed: '',
  709. columnWidth: 40
  710. },
  711. {
  712. userId: this.$store.state.user.name,
  713. functionId: 106002,
  714. serialNumber: '106002Table2QuotationNo',
  715. tableId: '106002Table2',
  716. tableName: '工具申请明细',
  717. columnProp: 'orderRef1',
  718. headerAlign: 'center',
  719. align: 'center',
  720. columnLabel: '项目编码',
  721. columnHidden: false,
  722. columnImage: false,
  723. columnSortable: false,
  724. sortLv: 0,
  725. status: true,
  726. fixed: '',
  727. columnWidth: 100
  728. },
  729. {
  730. userId: this.$store.state.user.name,
  731. functionId: 106002,
  732. serialNumber: '106002Table2ToolNo',
  733. tableId: '106002Table2',
  734. tableName: '工具申请明细',
  735. columnProp: 'toolId',
  736. headerAlign: 'center',
  737. align: 'center',
  738. columnLabel: '工具编码',
  739. columnHidden: false,
  740. columnImage: false,
  741. columnSortable: false,
  742. sortLv: 0,
  743. status: true,
  744. fixed: '',
  745. columnWidth: 70
  746. },
  747. {
  748. userId: this.$store.state.user.name,
  749. functionId: 106002,
  750. serialNumber: '106002Table2ToolDescription',
  751. tableId: '106002Table2',
  752. tableName: '工具申请明细',
  753. columnProp: 'toolDesc',
  754. headerAlign: 'center',
  755. align: 'center',
  756. columnLabel: '工具描述',
  757. columnHidden: false,
  758. columnImage: false,
  759. columnSortable: false,
  760. sortLv: 0,
  761. status: true,
  762. fixed: '',
  763. columnWidth: 120
  764. },
  765. {
  766. userId: this.$store.state.user.name,
  767. functionId: 106002,
  768. serialNumber: '106002Table2ApplyQty',
  769. tableId: '106002Table2',
  770. tableName: '工具申请明细',
  771. columnProp: 'applyQty',
  772. headerAlign: 'center',
  773. align: 'center',
  774. columnLabel: '申请数量',
  775. columnHidden: false,
  776. columnImage: false,
  777. columnSortable: false,
  778. sortLv: 0,
  779. status: true,
  780. fixed: '',
  781. columnWidth: 80
  782. },
  783. {
  784. userId: this.$store.state.user.name,
  785. functionId: 106002,
  786. serialNumber: '106002Table2UnitCost',
  787. tableId: '106002Table2',
  788. tableName: '工具申请明细',
  789. columnProp: 'standardCost',
  790. headerAlign: 'center',
  791. align: 'center',
  792. columnLabel: '工具成本',
  793. columnHidden: false,
  794. columnImage: false,
  795. columnSortable: false,
  796. sortLv: 0,
  797. status: true,
  798. fixed: '',
  799. columnWidth: 60
  800. },
  801. {
  802. userId: this.$store.state.user.name,
  803. functionId: 106002,
  804. serialNumber: '106002Table2QuotationNo',
  805. tableId: '106002Table2',
  806. tableName: '工具申请明细',
  807. columnProp: 'orderRef2',
  808. headerAlign: 'center',
  809. align: 'center',
  810. columnLabel: '物料编码',
  811. columnHidden: false,
  812. columnImage: false,
  813. columnSortable: false,
  814. sortLv: 0,
  815. status: true,
  816. fixed: '',
  817. columnWidth: 70
  818. }, {
  819. userId: this.$store.state.user.name,
  820. functionId: 106002,
  821. serialNumber: '106002Table2QuotationNo',
  822. tableId: '106002Table2',
  823. tableName: '工具申请明细',
  824. columnProp: 'orderRef3',
  825. headerAlign: 'center',
  826. align: 'center',
  827. columnLabel: '工艺路线版本',
  828. columnHidden: false,
  829. columnImage: false,
  830. columnSortable: false,
  831. sortLv: 0,
  832. status: true,
  833. fixed: '',
  834. columnWidth: 70
  835. },
  836. {
  837. userId: this.$store.state.user.name,
  838. functionId: 106002,
  839. serialNumber: '106002Table2QuotationNo',
  840. tableId: '106002Table2',
  841. tableName: '工具申请明细',
  842. columnProp: 'orderRef5',
  843. headerAlign: 'center',
  844. align: 'center',
  845. columnLabel: '替代编码',
  846. columnHidden: false,
  847. columnImage: false,
  848. columnSortable: false,
  849. sortLv: 0,
  850. status: true,
  851. fixed: '',
  852. columnWidth: 70
  853. },{
  854. userId: this.$store.state.user.name,
  855. functionId: 106002,
  856. serialNumber: '106002Table2QuotationNo',
  857. tableId: '106002Table2',
  858. tableName: '工具申请明细',
  859. columnProp: 'operationNo',
  860. headerAlign: 'center',
  861. align: 'center',
  862. columnLabel: '工序号',
  863. columnHidden: false,
  864. columnImage: false,
  865. columnSortable: false,
  866. sortLv: 0,
  867. status: true,
  868. fixed: '',
  869. columnWidth: 70
  870. },{
  871. userId: this.$store.state.user.name,
  872. functionId: 106002,
  873. serialNumber: '106002Table2QuotationNo',
  874. tableId: '106002Table2',
  875. tableName: '工具申请明细',
  876. columnProp: 'operationName',
  877. headerAlign: 'center',
  878. align: 'center',
  879. columnLabel: '工序',
  880. columnHidden: false,
  881. columnImage: false,
  882. columnSortable: false,
  883. sortLv: 0,
  884. status: true,
  885. fixed: '',
  886. columnWidth: 70
  887. },
  888. ],
  889. columnFileContentArray: [
  890. {
  891. columnProp: 'fileName',
  892. headeralign: 'left',
  893. align: 'left',
  894. columnLabel: '文件名称',
  895. columnHidden: false,
  896. columnImage: false,
  897. columnSortable: false,
  898. sortLv: 0,
  899. status: true,
  900. fixed: false
  901. // }, {
  902. // columnProp: 'createdBy',
  903. // headeralign: 'left',
  904. // align: 'left',
  905. // columnLabel: '上传人',
  906. // columnHidden: false,
  907. // columnImage: false,
  908. // columnSortable: true,
  909. // sortLv: 0,
  910. // status: true,
  911. // fixed: false
  912. }, {
  913. columnProp: 'createDate',
  914. headeralign: 'left',
  915. align: 'left',
  916. columnLabel: '上传时间',
  917. columnHidden: false,
  918. columnImage: false,
  919. columnSortable: true,
  920. sortLv: 0,
  921. status: true,
  922. fixed: false
  923. }, {
  924. columnProp: 'orderRef3',
  925. headeralign: 'left',
  926. align: 'left',
  927. columnLabel: '类型',
  928. columnHidden: false,
  929. columnImage: false,
  930. columnSortable: true,
  931. sortLv: 0,
  932. status: true,
  933. fixed: false
  934. },
  935. ],
  936. approvalList: [],
  937. rejectOpinion: '',
  938. submitModalFlag: false,
  939. }
  940. },
  941. watch: {
  942. // columnList1: {
  943. // deep: true,
  944. // handler: function (newV, oldV) {
  945. // debugger
  946. //
  947. // }
  948. // }
  949. },
  950. mounted() {
  951. this.$nextTick(() => {
  952. this.height = window.innerHeight - 520;
  953. })
  954. },
  955. methods: {
  956. // 查询审批信息
  957. getApprovalList () {
  958. if (Object.keys(this.currentRow).length !== 0) {
  959. let tempData = {
  960. site: this.$store.state.user.site,
  961. menuId: this.$route.meta.menuId,
  962. documentNo: this.currentRow.applyNo
  963. }
  964. getApprovalList(tempData).then(({data}) => {
  965. if (data && data.code === 0) {
  966. this.approvalList = data.rows
  967. } else {
  968. this.approvalList = []
  969. }
  970. })
  971. }
  972. },
  973. // 获取基础数据列表S
  974. getBaseList (val, type) {
  975. this.tagNo = val
  976. this.tagNo2 = type
  977. this.$nextTick(() => {
  978. let strVal = ''
  979. if (val === 1010) {
  980. if(type==1) {
  981. strVal = this.searchData.projectType
  982. }
  983. }
  984. this.$refs.baseList.init(val, strVal)
  985. })
  986. },
  987. /* 列表方法的回调 */
  988. getBaseData (val) {
  989. if (this.tagNo === 1010) {
  990. if(this.tagNo2==1) {
  991. this.searchData.projectType = val.Base_desc
  992. }
  993. }
  994. },
  995. //导出excel
  996. async createExportData() {
  997. this.searchData.limit = -1
  998. this.searchData.page = 1
  999. await searchToolApplyHeader(this.searchData).then(({data}) => {
  1000. this.exportList= data.page.list;
  1001. })
  1002. return this.exportList;
  1003. },
  1004. startDownload() {
  1005. // this.exportData = this.dataList
  1006. },
  1007. finishDownload() {
  1008. },
  1009. fields() {
  1010. let json = "{"
  1011. this.columnList1.forEach((item, index) => {
  1012. if (index == this.columnList1.length - 1) {
  1013. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1014. } else {
  1015. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1016. }
  1017. })
  1018. json += "}"
  1019. let s = eval("(" + json + ")")
  1020. return s
  1021. },
  1022. //导出excel
  1023. async createExportData2() {
  1024. return this.contactList;
  1025. },
  1026. startDownload2() {
  1027. // this.exportData = this.dataList
  1028. },
  1029. finishDownload2() {
  1030. },
  1031. fields2() {
  1032. let json = "{"
  1033. this.columnList2.forEach((item, index) => {
  1034. if (index == this.columnList2.length - 1) {
  1035. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1036. } else {
  1037. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1038. }
  1039. })
  1040. json += "}"
  1041. let s = eval("(" + json + ")")
  1042. return s
  1043. },
  1044. // 导出 end
  1045. // 获取数据列表
  1046. search () {
  1047. this.searchData.limit = this.pageSize
  1048. this.searchData.page = this.pageIndex
  1049. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1050. if (data.code == 0) {
  1051. this.dataList1 = data.page.list
  1052. this.pageIndex = data.page.currPage
  1053. this.pageSize = data.page.pageSize
  1054. this.totalPage = data.page.totalCount
  1055. if(this.dataList1.length>0){
  1056. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1057. this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
  1058. }else {
  1059. this.currentRow ={}
  1060. }
  1061. this.refreshCurrentTabTable ()
  1062. }
  1063. this.dataListLoading = false
  1064. })
  1065. },
  1066. //单击切换订单
  1067. changeData(row) {
  1068. this.currentRow = JSON.parse(JSON.stringify(row));
  1069. this.currentRow2 = row;
  1070. this.refreshCurrentTabTable ();
  1071. },
  1072. addUploadFileModal(){
  1073. let currentData = {
  1074. site: this.currentRow.site,
  1075. createBy: this.$store.state.user.name,
  1076. projectId: this.currentRow.applyNo,
  1077. projectName: '',
  1078. remark: '',
  1079. };
  1080. //打开组件 去做新增业务
  1081. this.$nextTick(() => {
  1082. this.$refs.projectUploadFile.init(currentData);
  1083. })
  1084. },
  1085. deleteFile(row){
  1086. this.$confirm('确定要删除此文件?', '提示', {
  1087. confirmButtonText: '确定',
  1088. cancelButtonText: '取消',
  1089. type: 'warning'
  1090. }).then(() => {
  1091. deleteProjectFile(row).then(({data}) => {
  1092. if (data && data.code == 0) {
  1093. this.getFileContentData();
  1094. this.$message({
  1095. message: '操作成功',
  1096. type: 'success',
  1097. duration: 1500,
  1098. onClose: () => {
  1099. }
  1100. })
  1101. } else {
  1102. this.$alert(data.msg, '错误', {
  1103. confirmButtonText: '确定'
  1104. })
  1105. }
  1106. })
  1107. }).catch(() => {
  1108. })
  1109. },
  1110. tabClick (tab, event) {
  1111. // 刷新列表数据
  1112. this.refreshCurrentTabTable()
  1113. },
  1114. // 刷新页签的table数据
  1115. refreshCurrentTabTable () {
  1116. if (this.activeName == 'detail') {
  1117. this.searchToolApplyDetail();
  1118. }
  1119. if (this.activeName == 'down') {
  1120. // this.getFileContentData();
  1121. }
  1122. if (this.activeName === 'approvalInformation') {
  1123. this.getApprovalList()
  1124. }
  1125. },
  1126. searchToolApplyDetail(){
  1127. if(this.currentRow.applyNo){
  1128. searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
  1129. if (data.code == 0) {
  1130. this.detailList = data.rows
  1131. }
  1132. })
  1133. }else {
  1134. this.detailList =[]
  1135. }
  1136. },
  1137. editModal (row) {
  1138. this.dataForm = {
  1139. site: row.site,
  1140. applyNo: row.applyNo,
  1141. applyBy: row.applyBy,
  1142. applyDate: row.applyDate,
  1143. applySumQty: row.applySumQty,
  1144. applyReason: row.applyReason,
  1145. remark: row.remark,
  1146. createBy: row.createBy,
  1147. detailList: [],
  1148. status: row.status,
  1149. rejectOpinion: '',
  1150. nodeConclusion: '',
  1151. menuId: this.$route.meta.menuId,
  1152. userName: this.$store.state.user.name,
  1153. }
  1154. searchProjectToolApplyDetail({ site: row.site,
  1155. applyNo: row.applyNo,}).then(({data}) => {
  1156. if (data.code == 0) {
  1157. this.toolData = data.rows
  1158. }
  1159. })
  1160. this.visible=true
  1161. },
  1162. comfirmApply (row) {
  1163. this.$confirm(`确定下达这个申请`, '提示', {
  1164. confirmButtonText: '确定',
  1165. cancelButtonText: '取消',
  1166. type: 'warning'
  1167. }).then(() => {
  1168. let tempData = {
  1169. site: row.site,
  1170. userName: this.$store.state.user.name,
  1171. applyNo: row.applyNo,
  1172. menuId: this.$route.meta.menuId
  1173. }
  1174. comfirmProjectToolApply(tempData).then(({data}) => {
  1175. if (data && data.code === 0) {
  1176. row.statusCode = '10'
  1177. row.status = '下达'
  1178. this.$message({
  1179. message: '操作成功',
  1180. type: 'success',
  1181. duration: 1500,
  1182. onClose: () => {}
  1183. })
  1184. } else {
  1185. this.$alert(data.msg, '错误', {
  1186. confirmButtonText: '确定'
  1187. })
  1188. }
  1189. })
  1190. })
  1191. },
  1192. cancelApply(row){
  1193. this.$confirm(`确定取消这个申请`, '提示', {
  1194. confirmButtonText: '确定',
  1195. cancelButtonText: '取消',
  1196. type: 'warning'
  1197. }).then(() => {
  1198. cancelProjectToolApply(row).then(({data}) => {
  1199. if (data && data.code === 0) {
  1200. this.search();
  1201. this.$message({
  1202. message: '操作成功',
  1203. type: 'success',
  1204. duration: 1500,
  1205. onClose: () => {
  1206. }
  1207. })
  1208. } else {
  1209. this.$alert(data.msg, '错误', {
  1210. confirmButtonText: '确定'
  1211. })
  1212. }
  1213. })
  1214. })
  1215. },
  1216. //刷新派设备文档的列表
  1217. getFileContentData() {
  1218. let currentData = {orderRef2: this.currentRow.applyNo};
  1219. getFileContentList(currentData).then(({data}) => {
  1220. //区分请求成功和失败的状况
  1221. if (data && data.code == 200) {
  1222. this.fileContentList = data.rows;
  1223. } else {
  1224. this.fileContentList = [];
  1225. }
  1226. });
  1227. },
  1228. // 下载
  1229. downloadFile(row){
  1230. // let inData={
  1231. // site:this.currentRow.site,
  1232. // username:this.$store.state.user.name,
  1233. // projectId:this.currentRow.projectId
  1234. // }
  1235. // getProjectUserRole(inData).then(({data}) => {
  1236. // if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  1237. downLoadProjectFile(row)
  1238. .then(({data}) => {
  1239. // 不限制文件下载类型
  1240. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1241. // 下载文件名称
  1242. const fileName = row.fileName
  1243. // a标签下载
  1244. const linkNode = document.createElement('a')
  1245. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1246. linkNode.style.display = 'none'
  1247. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1248. console.log(linkNode)
  1249. // if(val == 'Y'){
  1250. // this.pdfVisible = true
  1251. // this.pdfUrl = linkNode.href
  1252. // }else {
  1253. document.body.appendChild(linkNode)
  1254. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1255. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1256. document.body.removeChild(linkNode)
  1257. // }
  1258. })
  1259. // }else {
  1260. // this.$alert('没有权限下载这个项目的文件!', '错误', {
  1261. // confirmButtonText: '确定'
  1262. // })
  1263. // }
  1264. // })
  1265. },
  1266. // 每页数
  1267. sizeChangeHandle (val) {
  1268. this.pageSize = val
  1269. this.pageIndex = 1
  1270. this.search()
  1271. },
  1272. // 当前页
  1273. currentChangeHandle (val) {
  1274. this.pageIndex = val
  1275. this.search()
  1276. },
  1277. openMassageModel(){
  1278. if(Object.keys(this.currentRow).length === 0){
  1279. this.$alert('未选择记录!', '错误', {
  1280. confirmButtonText: '确定'
  1281. })
  1282. return false;
  1283. }
  1284. this.modelData={
  1285. site:this.currentRow.site,
  1286. applyNo:this.currentRow.applyNo,
  1287. prNo:this.currentRow.prNo,
  1288. remark1:this.currentRow.remark1,
  1289. poNo:this.currentRow.poNo,
  1290. supplierName:this.currentRow.supplierName,
  1291. allCost:this.currentRow.allCost,
  1292. remark2:this.currentRow.remark2,
  1293. }
  1294. this.modelFlag=true
  1295. },
  1296. changeSum() {
  1297. this.dataForm.applySumQty = 0
  1298. for (const item of this.toolData) {
  1299. // 累加之前先确保值存在,并将 null 或 undefined 转换为0
  1300. this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
  1301. }
  1302. },
  1303. saveHeaderMessage(){
  1304. this.$confirm('确定是否保存','提示',{
  1305. confirmButtonText:'确定',
  1306. cancelButtonText:'取消',
  1307. type:'warning'
  1308. }).then(()=>{
  1309. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  1310. if (data && data.code == 0) {
  1311. this.modelFlag=false;
  1312. this.currentRow.prNo=this.modelData.prNo
  1313. this.currentRow.remark1=this.modelData.remark1
  1314. this.currentRow.poNo=this.modelData.poNo
  1315. this.currentRow.supplierName=this.modelData.supplierName
  1316. this.currentRow.allCost=this.modelData.allCost
  1317. this.currentRow.remark2=this.modelData.remark2
  1318. this.currentRow2.prNo=this.modelData.prNo
  1319. this.currentRow2.remark1=this.modelData.remark1
  1320. this.currentRow2.poNo=this.modelData.poNo
  1321. this.currentRow2.supplierName=this.modelData.supplierName
  1322. this.currentRow2.allCost=this.modelData.allCost
  1323. this.currentRow2.remark2=this.modelData.remark2
  1324. this.$message({
  1325. message: '操作成功',
  1326. type: 'success',
  1327. duration: 1500,
  1328. onClose: () => {
  1329. }
  1330. })
  1331. } else {
  1332. this.$alert(data.msg, '错误', {
  1333. confirmButtonText: '确定'
  1334. })
  1335. }
  1336. })
  1337. })
  1338. },
  1339. // 同意提交
  1340. agreeSubmit () {
  1341. this.$confirm(`是否确认提交?`, '提示', {
  1342. confirmButtonText: '确定',
  1343. cancelButtonText: '取消',
  1344. type: 'warning'
  1345. }).then(() => {
  1346. this.dataForm.nodeConclusion = 'Y'
  1347. this.submitData()
  1348. })
  1349. },
  1350. // 打开提交模态框
  1351. submitDataModal () {
  1352. this.rejectOpinion = ''
  1353. this.submitModalFlag = true
  1354. },
  1355. // 驳回提交
  1356. rejectSubmit () {
  1357. this.$confirm(`是否确认驳回?`, '提示', {
  1358. confirmButtonText: '确定',
  1359. cancelButtonText: '取消',
  1360. type: 'warning'
  1361. }).then(() => {
  1362. this.dataForm.rejectOpinion = this.rejectOpinion
  1363. this.dataForm.nodeConclusion = 'N'
  1364. this.submitData()
  1365. })
  1366. },
  1367. // 提交
  1368. submitData () {
  1369. this.dataForm.userName = this.$store.state.user.name
  1370. this.dataForm.menuId = this.$route.meta.menuId
  1371. this.dataForm.detailList = this.toolData
  1372. submitChange(this.dataForm).then(({data}) => {
  1373. if (data && data.code === 0) {
  1374. for (let i = 0; i <this.dataList1.length ; i++) {
  1375. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1376. this.dataList1[i].remark = this.dataForm.remark
  1377. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1378. this.dataList1[i].applyReason = this.dataForm.applyReason
  1379. }
  1380. }
  1381. this.refreshCurrentTabTable()
  1382. this.submitModalFlag = false
  1383. this.visible = false
  1384. this.$message({
  1385. message: '操作成功',
  1386. type: 'success',
  1387. duration: 1500,
  1388. onClose: () => {
  1389. }
  1390. })
  1391. } else {
  1392. this.$alert(data.msg, '错误', {
  1393. confirmButtonText: '确定'
  1394. })
  1395. }
  1396. })
  1397. },
  1398. saveData () {
  1399. this.dataForm.detailList = this.toolData
  1400. editToolApplication(this.dataForm).then(({data}) => {
  1401. if (data && data.code === 0) {
  1402. for (let i = 0; i <this.dataList1.length ; i++) {
  1403. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1404. this.dataList1[i].remark = this.dataForm.remark
  1405. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1406. this.dataList1[i].applyReason = this.dataForm.applyReason
  1407. }
  1408. }
  1409. this.visible = false
  1410. this.refreshCurrentTabTable()
  1411. this.$message({
  1412. message: '操作成功',
  1413. type: 'success',
  1414. duration: 1500,
  1415. onClose: () => {
  1416. }
  1417. })
  1418. } else {
  1419. this.$alert(data.msg, '错误', {
  1420. confirmButtonText: '确定'
  1421. })
  1422. }
  1423. })
  1424. },
  1425. jumpBM(row){
  1426. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404'){
  1427. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  1428. }else {
  1429. let inData={
  1430. site:row.site,
  1431. testPartNo:row.orderRef2
  1432. }
  1433. getProjectPartNowBm(inData).then(({data}) => {
  1434. //区分请求成功和失败的状况
  1435. if (data && data.code == 0) {
  1436. if(data.rows==null||data.rows.length==0){
  1437. this.$alert('该物料没有benchmark', '警告', {confirmButtonText: '确定',});
  1438. }
  1439. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo:data.rows[0].nowBm},})
  1440. } else {
  1441. }
  1442. });
  1443. }
  1444. },
  1445. },
  1446. activated() {
  1447. },
  1448. }
  1449. </script>
  1450. <style >
  1451. .el-transfer-panel {
  1452. border: 2px solid #17b3a3;
  1453. border-radius: 4px;
  1454. overflow: hidden;
  1455. background: #fff;
  1456. display: inline-block;
  1457. vertical-align: middle;
  1458. width: 200px;
  1459. max-height: 100%;
  1460. -webkit-box-sizing: border-box;
  1461. box-sizing: border-box;
  1462. position: relative;
  1463. }
  1464. .el-transfer-panel .el-transfer-panel__header {
  1465. height: 40px;
  1466. line-height: 40px;
  1467. background: #17b3a3;
  1468. margin: 0;
  1469. padding-left: 15px;
  1470. border-bottom: 1px solid #17b3a3;
  1471. -webkit-box-sizing: border-box;
  1472. box-sizing: border-box;
  1473. color: #000;
  1474. }
  1475. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  1476. font-size: 14px;
  1477. color: #303133;
  1478. font-weight: 400;
  1479. }
  1480. </style>