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.

1540 lines
52 KiB

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