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.

2103 lines
74 KiB

3 years ago
​
​
2 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
2 years ago
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
3 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
​
​
3 years ago
3 years ago
3 years ago
​
​
​
3 years ago
3 years ago
​
3 years ago
3 years ago
​
​
​
3 years ago
3 years ago
​
​
3 years ago
3 years ago
​
3 years ago
3 years ago
​
​
​
3 years ago
3 years ago
​
​
​
3 years ago
3 years ago
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
2 years ago
3 years ago
​
​
​
2 years ago
3 years ago
​
​
​
​
2 years ago
2 years ago
2 years ago
3 years ago
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
2 years ago
3 years ago
​
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
2 years ago
​
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
​
​
2 years ago
3 years ago
​
​
​
​
​
​
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
​
​
2 years ago
3 years ago
​
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
​
​
2 years ago
3 years ago
​
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
​
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
​
​
2 years ago
3 years ago
​
​
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
2 years ago
3 years ago
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
2 years ago
3 years ago
2 years ago
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
2 years ago
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
3 years ago
​
​
3 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
​
3 years ago
2 years ago
3 years ago
​
2 years ago
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
3 years ago
2 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
2 years ago
2 years ago
2 years ago
​
​
2 years ago
2 years ago
​
3 years ago
​
​
​
​
​
2 years ago
3 years ago
​
3 years ago
​
​
​
​
2 years ago
3 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
2 years ago
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
3 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
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
2 years ago
2 years ago
2 years ago
​
​
​
​
3 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
3 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.status==='计划'" @click="comfirmApply(scope.row)">下达</a>
  61. <a type="text" size="small" v-if="scope.row.status==='计划'" @click="editModalU(scope.row)">修改</a>
  62. <a type="text" size="small" v-if="scope.row.status=='审批中'" @click="editModal(scope.row)">审批</a>
  63. <a type="text" size="small" v-if="scope.row.status==='计划'" @click="cancelApply(scope.row)">取消申请</a>
  64. </template>
  65. </el-table-column>
  66. <el-table-column
  67. v-for="(item,index) in columnList1" :key="index"
  68. :sortable="item.columnSortable"
  69. :prop="item.columnProp"
  70. :header-align="item.headerAlign"
  71. :show-overflow-tooltip="item.showOverflowTooltip"
  72. :align="item.align"
  73. :fixed="item.fixed==''?false:item.fixed"
  74. :min-width="item.columnWidth"
  75. :label="item.columnLabel">
  76. <template slot-scope="scope">
  77. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  78. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  79. style="width: 100px; height: 80px"/></span>
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. <el-pagination
  84. @size-change="sizeChangeHandle"
  85. @current-change="currentChangeHandle"
  86. :current-page="pageIndex"
  87. :page-sizes="[20, 50, 100, 1000]"
  88. :page-size="pageSize"
  89. :total="totalPage"
  90. layout="total, sizes, prev, pager, next, jumper">
  91. </el-pagination>
  92. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  93. <el-tab-pane label="工具明细" name="detail">
  94. <el-table
  95. :data="detailList"
  96. height="240"
  97. border
  98. v-loading="dataListLoading"
  99. style="width: 100%; ">
  100. <el-table-column
  101. v-for="(item,index) in columnList2" :key="index"
  102. :sortable="item.columnSortable"
  103. :prop="item.columnProp"
  104. :header-align="item.headerAlign"
  105. :show-overflow-tooltip="item.showOverflowTooltip"
  106. :align="item.align"
  107. :fixed="item.fixed==''?false:item.fixed"
  108. :min-width="item.columnWidth"
  109. :label="item.columnLabel">
  110. <template slot-scope="scope">
  111. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  112. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  113. style="width: 100px; height: 80px"/></span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column
  117. header-align="center"
  118. align="center"
  119. width="120"
  120. fixed="right"
  121. label="操作">
  122. <template slot-scope="scope">
  123. <a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
  124. </template>
  125. </el-table-column>
  126. <!-- <el-table-column-->
  127. <!-- fixed="right"-->
  128. <!-- header-align="center"-->
  129. <!-- align="center"-->
  130. <!-- width="100"-->
  131. <!-- label="操作">-->
  132. <!-- <template slot-scope="scope">-->
  133. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  134. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  135. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  136. <!-- </template>-->
  137. <!-- </el-table-column>-->
  138. </el-table>
  139. </el-tab-pane>
  140. <el-tab-pane label="处理信息" name="tab4">
  141. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  142. <!-- <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>-->
  143. <!-- <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>-->
  144. </el-form>
  145. <el-form label-position="top" :model="currentRow" >
  146. <el-row :gutter="15">
  147. <el-col :span="6">
  148. <el-form-item label="IFS PR编号" >
  149. <el-input v-model="currentRow.prNo" readonly></el-input>
  150. </el-form-item>
  151. </el-col>
  152. <el-col :span="18">
  153. <el-form-item label="备注" >
  154. <el-input v-model="currentRow.remark1" readonly></el-input>
  155. </el-form-item>
  156. </el-col>
  157. </el-row>
  158. <el-row :gutter="15" style="margin-top: 20px">
  159. <el-col :span="6">
  160. <el-form-item label="采购订单号" >
  161. <el-input v-model="currentRow.poNo" readonly ></el-input>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="6">
  165. <el-form-item label="厂商名称" >
  166. <el-input v-model="currentRow.supplierName" readonly></el-input>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :span="6">
  170. <el-form-item label="总成本(元)" >
  171. <el-input v-model="currentRow.allCost" readonly></el-input>
  172. </el-form-item>
  173. </el-col>
  174. </el-row>
  175. <el-row :gutter="15" style="margin-top: 0px">
  176. <el-col :span="24">
  177. <el-form-item label="备注" >
  178. <el-input v-model="currentRow.remark2" readonly></el-input>
  179. </el-form-item>
  180. </el-col>
  181. </el-row>
  182. </el-form>
  183. </el-tab-pane>
  184. <el-tab-pane label="附件信息" name="down">
  185. <oss-components height="25vh" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  186. </el-tab-pane>
  187. <!-- 审批信息 -->
  188. <el-tab-pane label="审批信息" name="approvalInformation">
  189. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
  190. </el-tab-pane>
  191. </el-tabs>
  192. <el-dialog
  193. width="800px" v-drag
  194. :title="'刀模申请修改'"
  195. :close-on-click-modal="false"
  196. :visible.sync="visibleU">
  197. <el-form :inline="true" label-position="top" label-width="100px" >
  198. <el-form-item :label="'申请编号'">
  199. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  200. </el-form-item>
  201. <el-form-item :label="'申请总数'">
  202. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  203. </el-form-item>
  204. <el-form-item :label="'总成本'">
  205. <el-input v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
  206. </el-form-item>
  207. <el-form-item :label="'申请人'" required="required">
  208. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  209. </el-form-item>
  210. <el-form-item :label="'申请日期'" required="required">
  211. <el-date-picker
  212. value-format="yyyy-MM-dd"
  213. style="width: 100%"
  214. v-model="dataForm.applyDate"
  215. type="date"
  216. disabled
  217. placeholder="结束日期">
  218. </el-date-picker>
  219. </el-form-item>
  220. <el-form-item label="部门" required="required">
  221. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
  222. </el-form-item>
  223. <el-form-item required="required">
  224. <span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
  225. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  226. </el-form-item>
  227. <el-form-item required="required">
  228. <span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">TP</a></span>
  229. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  230. </el-form-item>
  231. <el-form-item required="required">
  232. <span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span>
  233. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  234. </el-form-item>
  235. </el-form>
  236. <el-form :inline="true" label-position="top" label-width="100px" >
  237. <el-form-item :label="'申请原因'">
  238. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  239. v-model="dataForm.applyReason"/>
  240. </el-form-item>
  241. </el-form>
  242. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 60px">
  243. <el-form-item :label="'备注'">
  244. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  245. v-model="dataForm.remark"/>
  246. </el-form-item>
  247. </el-form>
  248. <el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card" >
  249. <el-tab-pane label="工具明细" name="detail">
  250. <div class="rq" >
  251. <el-table
  252. height="250"
  253. :data="toolData"
  254. border
  255. ref="toolTable"
  256. v-loading="dataListLoading"
  257. style="width: 100%;">
  258. <el-table-column
  259. v-for="(item,index) in columnList2" :key="index"
  260. :sortable="item.columnSortable"
  261. :prop="item.columnProp"
  262. :header-align="item.headerAlign"
  263. :show-overflow-tooltip="item.showOverflowTooltip"
  264. :align="item.align"
  265. :fixed="item.fixed==''?false:item.fixed"
  266. :min-width="item.columnWidth"
  267. :label="item.columnLabel">
  268. <template slot-scope="scope">
  269. <div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
  270. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  271. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  272. style="width: 100px; height: 80px"/></span>
  273. </div>
  274. <div v-else-if=" (item.columnProp === 'standardCost')">
  275. <el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本"
  276. style="width:98%"></el-input>
  277. </div>
  278. <div v-else>
  279. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  280. style="width:98%"></el-input>
  281. </div>
  282. </template>
  283. </el-table-column>
  284. </el-table>
  285. </div>
  286. </el-tab-pane>
  287. <el-tab-pane label="TP处理结果" name="tp">
  288. <el-form label-position="top" >
  289. <el-row :gutter="15" >
  290. <el-col :span="6">
  291. <el-form-item label="IFS PR编号" >
  292. <el-input v-model="modelData.prNo" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
  293. </el-form-item>
  294. </el-col>
  295. <el-col :span="24" >
  296. <el-form-item label="备注" style="height: 80px">
  297. <el-input type="textarea" v-model="modelData.remark1" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
  298. </el-form-item>
  299. </el-col>
  300. </el-row>
  301. </el-form>
  302. </el-tab-pane>
  303. <el-tab-pane label="采购处理结果" name="caigou">
  304. <el-form label-position="top" >
  305. <el-row :gutter="15" style="margin-top: 0px" >
  306. <el-col :span="6">
  307. <el-form-item label="采购订单号" >
  308. <el-input v-model="modelData.poNo" :disabled="$store.state.user.name!==dataForm.purchaser" ></el-input>
  309. </el-form-item>
  310. </el-col>
  311. <el-col :span="6">
  312. <el-form-item label="厂商名称" >
  313. <el-input v-model="modelData.supplierName" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
  314. </el-form-item>
  315. </el-col>
  316. <el-col :span="6">
  317. <el-form-item label="总成本(元)" >
  318. <el-input v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
  319. </el-form-item>
  320. </el-col>
  321. </el-row>
  322. <el-row :gutter="15" style="margin-top: 0px">
  323. <el-col :span="24">
  324. <el-form-item label="备注" style="height: 80px">
  325. <el-input type="textarea" v-model="modelData.remark2" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
  326. </el-form-item>
  327. </el-col>
  328. </el-row>
  329. </el-form>
  330. </el-tab-pane>
  331. </el-tabs>
  332. <span slot="footer" class="dialog-footer">
  333. <el-button type="primary" @click="saveData()">{{'保存'}}</el-button>
  334. <el-button type="primary" @click="visibleU = false">{{'取消'}}</el-button>
  335. </span>
  336. </el-dialog>
  337. <el-dialog
  338. width="800px" v-drag
  339. :title="'刀模申请审批'"
  340. :close-on-click-modal="false"
  341. :visible.sync="visible">
  342. <el-form :inline="true" label-position="top" label-width="100px" >
  343. <el-form-item :label="'申请编号'">
  344. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  345. </el-form-item>
  346. <el-form-item :label="'申请总数'">
  347. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  348. </el-form-item>
  349. <el-form-item :label="'总成本'">
  350. <el-input v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
  351. </el-form-item>
  352. <el-form-item :label="'申请人'" required="required">
  353. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  354. </el-form-item>
  355. <el-form-item :label="'申请日期'" required="required">
  356. <el-date-picker
  357. value-format="yyyy-MM-dd"
  358. style="width: 100%"
  359. v-model="dataForm.applyDate"
  360. type="date"
  361. disabled
  362. placeholder="结束日期">
  363. </el-date-picker>
  364. </el-form-item>
  365. <el-form-item label="部门" required="required">
  366. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
  367. </el-form-item>
  368. <el-form-item required="required">
  369. <span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
  370. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  371. </el-form-item>
  372. <el-form-item required="required">
  373. <span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">TP</a></span>
  374. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  375. </el-form-item>
  376. <el-form-item required="required">
  377. <span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span>
  378. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  379. </el-form-item>
  380. </el-form>
  381. <el-form :inline="true" label-position="top" label-width="100px" >
  382. <el-form-item :label="'申请原因'">
  383. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  384. v-model="dataForm.applyReason"/>
  385. </el-form-item>
  386. </el-form>
  387. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 60px">
  388. <el-form-item :label="'备注'">
  389. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  390. v-model="dataForm.remark"/>
  391. </el-form-item>
  392. </el-form>
  393. <el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card" >
  394. <el-tab-pane label="工具明细" name="detail">
  395. <div class="rq" style="margin-top: 60px">
  396. <el-table
  397. height="250"
  398. :data="toolData"
  399. border
  400. ref="toolTable"
  401. v-loading="dataListLoading"
  402. style="width: 100%;">
  403. <el-table-column
  404. v-for="(item,index) in columnList2" :key="index"
  405. :sortable="item.columnSortable"
  406. :prop="item.columnProp"
  407. :header-align="item.headerAlign"
  408. :show-overflow-tooltip="item.showOverflowTooltip"
  409. :align="item.align"
  410. :fixed="item.fixed==''?false:item.fixed"
  411. :min-width="item.columnWidth"
  412. :label="item.columnLabel">
  413. <template slot-scope="scope">
  414. <div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
  415. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  416. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  417. style="width: 100px; height: 80px"/></span>
  418. </div>
  419. <div v-else-if=" (item.columnProp === 'standardCost')">
  420. <el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本"
  421. style="width:98%"></el-input>
  422. </div>
  423. <div v-else>
  424. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  425. style="width:98%"></el-input>
  426. </div>
  427. </template>
  428. </el-table-column>
  429. </el-table>
  430. </div>
  431. </el-tab-pane>
  432. <el-tab-pane label="TP处理结果" name="tp">
  433. <el-form label-position="top" >
  434. <el-row :gutter="15" >
  435. <el-col :span="6">
  436. <el-form-item label="IFS PR编号" >
  437. <el-input v-model="modelData.prNo" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
  438. </el-form-item>
  439. </el-col>
  440. <el-col :span="24" >
  441. <el-form-item label="备注" style="height: 80px">
  442. <el-input type="textarea" v-model="modelData.remark1" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
  443. </el-form-item>
  444. </el-col>
  445. </el-row>
  446. </el-form>
  447. </el-tab-pane>
  448. <el-tab-pane label="采购处理结果" name="caigou">
  449. <el-form label-position="top" >
  450. <el-row :gutter="15" style="margin-top: 0px" >
  451. <el-col :span="6">
  452. <el-form-item label="采购订单号" >
  453. <el-input v-model="modelData.poNo" :disabled="$store.state.user.name!==dataForm.purchaser" ></el-input>
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="6">
  457. <el-form-item label="厂商名称" >
  458. <el-input v-model="modelData.supplierName" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
  459. </el-form-item>
  460. </el-col>
  461. <el-col :span="6">
  462. <el-form-item label="总成本(元)" >
  463. <el-input v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
  464. </el-form-item>
  465. </el-col>
  466. </el-row>
  467. <el-row :gutter="15" style="margin-top: 0px">
  468. <el-col :span="24">
  469. <el-form-item label="备注" style="height: 80px">
  470. <el-input type="textarea" v-model="modelData.remark2" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
  471. </el-form-item>
  472. </el-col>
  473. </el-row>
  474. </el-form>
  475. </el-tab-pane>
  476. </el-tabs>
  477. <span slot="footer" class="dialog-footer">
  478. <!-- <el-button type="primary" @click="saveData()">{{'保存'}}</el-button>-->
  479. <el-button type="primary" @click="visible = false">{{'取消'}}</el-button>
  480. <el-button v-if="dataForm.status === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  481. <el-button v-if="dataForm.status === '审批中' && dataForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
  482. </span>
  483. </el-dialog>
  484. <el-dialog
  485. width="600px" v-drag
  486. :title="'处理信息'"
  487. :close-on-click-modal="false"
  488. :visible.sync="modelFlag">
  489. <el-form label-position="top" >
  490. <el-row :gutter="15" >
  491. <el-col :span="6">
  492. <el-form-item label="IFS PR编号" >
  493. <el-input v-model="modelData.prNo" ></el-input>
  494. </el-form-item>
  495. </el-col>
  496. <el-col :span="18">
  497. <el-form-item label="备注" >
  498. <el-input v-model="modelData.remark1" ></el-input>
  499. </el-form-item>
  500. </el-col>
  501. </el-row>
  502. <el-row :gutter="15" style="margin-top: 20px" >
  503. <el-col :span="6">
  504. <el-form-item label="采购订单号" >
  505. <el-input v-model="modelData.poNo" ></el-input>
  506. </el-form-item>
  507. </el-col>
  508. <el-col :span="6">
  509. <el-form-item label="厂商名称" >
  510. <el-input v-model="modelData.supplierName" ></el-input>
  511. </el-form-item>
  512. </el-col>
  513. <el-col :span="6">
  514. <el-form-item label="总成本(元)" >
  515. <el-input v-model="modelData.allCost" type="number" ></el-input>
  516. </el-form-item>
  517. </el-col>
  518. </el-row>
  519. <el-row :gutter="15" style="margin-top: 0px">
  520. <el-col :span="24">
  521. <el-form-item label="备注" >
  522. <el-input v-model="modelData.remark2" ></el-input>
  523. </el-form-item>
  524. </el-col>
  525. </el-row>
  526. </el-form>
  527. <span slot="footer" class="dialog-footer">
  528. <el-button type="primary" @click="saveHeaderMessage()">{{'保存'}}</el-button>
  529. <el-button type="primary" @click="modelFlag = false">{{'取消'}}</el-button>
  530. </span>
  531. </el-dialog>
  532. <!-- 提交 -->
  533. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag" width="500px">
  534. <el-form :inline="true" label-position="top">
  535. <el-form-item :label="'驳回意见'">
  536. <el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit style="width: 479px;height: 30px"></el-input>
  537. </el-form-item>
  538. </el-form>
  539. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  540. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  541. <el-button type="primary" @click="submitModalFlag = false">取消</el-button>
  542. </el-footer>
  543. </el-dialog>
  544. <!-- 上传文件的modal -->
  545. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  546. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  547. </div>
  548. </template>
  549. <script>
  550. import {
  551. customerInformationSearch, // 客户信息列表查询`
  552. } from '@/api/customer/customerInformation.js'
  553. import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
  554. import Chooselist from '@/views/modules/common/Chooselist'
  555. import {searchProjectToolApplyHeader,
  556. searchProjectToolApplyDetail,
  557. comfirmProjectToolApply,
  558. cancelProjectToolApply,
  559. saveProjectHeaderMessage,
  560. editToolApplication,
  561. submitChange
  562. } from "@/api/tool/toolApply.js"
  563. import {
  564. deleteProjectFile,
  565. getFileContentList,
  566. downLoadProjectFile,
  567. getProjectPartNowBm,
  568. } from "@/api/project/project.js"
  569. import {
  570. getNodeAuthority, // 获取节点权限
  571. getApprovalList, // 查询审批信息
  572. } from '@/api/changeManagement/changeManagement.js'
  573. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  574. import OssComponents from "../oss/ossComponents";
  575. import DictDataSelect from "../sys/dict-data-select.vue"
  576. /*組件*/
  577. export default {
  578. components: {
  579. ApprovalInformation,
  580. OssComponents,
  581. Chooselist,
  582. projectUploadFile,
  583. DictDataSelect,
  584. },
  585. name: "null",
  586. data() {
  587. return {
  588. visible:false,
  589. fileContentList: [],
  590. activeName: 'detail',
  591. activeModelName: 'detail',
  592. searchData:{
  593. page: 1,
  594. limit: 100,
  595. site:this.$store.state.user.site,
  596. applyNo:'',
  597. startDate:'',
  598. endDate:'',
  599. },
  600. toolData:[],
  601. visibleU:false,
  602. dataForm:{
  603. site: '',
  604. applyNo: '',
  605. applyBy:'',
  606. applyDate:'',
  607. applySumQty:'',
  608. applyReason:'',
  609. remark:'',
  610. createBy:'',
  611. detailList:[],
  612. status: '',
  613. rejectOpinion: '',
  614. nodeConclusion: '',
  615. quoter: '',
  616. quoterName: '',
  617. tp: '',
  618. tpName: '',
  619. purchaser: '',
  620. purchaserName: '',
  621. totalCost:'',
  622. menuId: this.$route.meta.menuId,
  623. userName: this.$store.state.user.name,
  624. nodeId: ''
  625. },
  626. modelData:{
  627. site:'',
  628. applyNo:'',
  629. prNo:'',
  630. remark1:'',
  631. poNo:'',
  632. supplierName:'',
  633. allCost:'',
  634. remark2:'',
  635. },
  636. modelFlag:false,
  637. currentRow:{},
  638. currentRow2:{},
  639. height: 200,
  640. dataList1:[],
  641. detailList:[],
  642. dataListLoading: false,
  643. // 导出 start
  644. exportData: [],
  645. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  646. exportHeader: ["项目清单"],
  647. exportFooter: [],
  648. exportList:[],
  649. // 导出 start
  650. exportData2: [],
  651. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  652. exportHeader2: ["项目客户联系人"],
  653. exportFooter2: [],
  654. exportList2:[],
  655. tagNo:'',
  656. tagNo2:'',
  657. pageIndex: 1,
  658. pageSize: 100,
  659. totalPage: 0,
  660. ossColumns:[
  661. {
  662. userId: this.$store.state.user.name,
  663. functionId: 103001,
  664. serialNumber: '103001Table2FileName',
  665. tableId: '103001Table2',
  666. tableName: '文件信息表',
  667. columnProp: 'fileName',
  668. headerAlign: 'center',
  669. align: 'center',
  670. columnLabel: '文件名称',
  671. columnHidden: false,
  672. columnImage: false,
  673. columnSortable: false,
  674. sortLv: 0,
  675. status: true,
  676. fixed: '',
  677. columnWidth: 140
  678. },
  679. {
  680. userId: this.$store.state.user.name,
  681. functionId: 103001,
  682. serialNumber: '103001Table2FileRemark',
  683. tableId: '103001Table2',
  684. tableName: '文件信息表',
  685. columnProp: 'fileRemark',
  686. headerAlign: 'center',
  687. align: 'center',
  688. columnLabel: '备注',
  689. columnHidden: false,
  690. columnImage: false,
  691. columnSortable: false,
  692. sortLv: 0,
  693. status: true,
  694. fixed: '',
  695. columnWidth: 240
  696. },
  697. // {
  698. // userId: this.$store.state.user.name,
  699. // functionId: 103001,
  700. // serialNumber: '103001Table2OrderRef3',
  701. // tableId: '103001Table2',
  702. // tableName: '文件信息表',
  703. // columnProp: 'orderRef3',
  704. // headerAlign: 'center',
  705. // align: 'center',
  706. // columnLabel: '文件描述',
  707. // columnHidden: false,
  708. // columnImage: false,
  709. // columnSortable: false,
  710. // sortLv: 0,
  711. // status: true,
  712. // fixed: '',
  713. // columnWidth: 120
  714. // },
  715. {
  716. userId: this.$store.state.user.name,
  717. functionId: 103001,
  718. serialNumber: '103001Table2CreateDate',
  719. tableId: '103001Table2',
  720. tableName: '文件信息表',
  721. columnProp: 'createDate',
  722. headerAlign: 'center',
  723. align: 'center',
  724. columnLabel: '上传时间',
  725. columnHidden: false,
  726. columnImage: false,
  727. columnSortable: false,
  728. sortLv: 0,
  729. status: true,
  730. fixed: '',
  731. columnWidth: 140
  732. },
  733. {
  734. userId: this.$store.state.user.name,
  735. functionId: 103001,
  736. serialNumber: '103001Table2CreatedBy',
  737. tableId: '103001Table2',
  738. tableName: '文件信息表',
  739. columnProp: 'createBy',
  740. headerAlign: 'center',
  741. align: 'center',
  742. columnLabel: '上传人',
  743. columnHidden: false,
  744. columnImage: false,
  745. columnSortable: false,
  746. sortLv: 0,
  747. status: true,
  748. fixed: '',
  749. columnWidth: 140
  750. }
  751. ],
  752. // 导出 end
  753. columnList1: [
  754. {
  755. userId: this.$store.state.user.name,
  756. functionId: 106002,
  757. serialNumber: '106002Table1Site',
  758. tableId: "106002Table1",
  759. tableName: "刀具申请主表",
  760. columnProp: "site",
  761. headerAlign: "center",
  762. align: "left",
  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: '106002Table1DepartmentDesc',
  776. tableId: "106002Table1",
  777. tableName: "刀具申请主表",
  778. columnProp: "departmentDesc",
  779. headerAlign: "center",
  780. align: "left",
  781. columnLabel: "部门",
  782. columnHidden: false,
  783. columnImage: false,
  784. columnSortable: false,
  785. sortLv: 0,
  786. status: true,
  787. fixed: '',
  788. columnWidth: 70
  789. },
  790. {
  791. userId: this.$store.state.user.name,
  792. functionId: 106002,
  793. serialNumber: '106002Table1ApplyNo',
  794. tableId: "106002Table1",
  795. tableName: "刀具申请主表",
  796. columnProp: "applyNo",
  797. headerAlign: "center",
  798. align: "left",
  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: '106002Table1ApplyBy',
  812. tableId: "106002Table1",
  813. tableName: "刀具申请主表",
  814. columnProp: "applyBy",
  815. headerAlign: "center",
  816. align: "left",
  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: '106002Table1Status',
  830. tableId: "106002Table1",
  831. tableName: "刀具申请主表",
  832. columnProp: "status",
  833. headerAlign: "center",
  834. align: "left",
  835. columnLabel: "状态",
  836. columnHidden: false,
  837. columnImage: false,
  838. columnSortable: false,
  839. sortLv: 0,
  840. status: true,
  841. fixed: '',
  842. columnWidth: 60
  843. },
  844. {
  845. userId: this.$store.state.user.name,
  846. functionId: 106002,
  847. serialNumber: '106002Table1NodeId',
  848. tableId: "106002Table1",
  849. tableName: "刀具申请主表",
  850. columnProp: "nodeId",
  851. headerAlign: "center",
  852. align: "left",
  853. columnLabel: "当前节点",
  854. columnHidden: false,
  855. columnImage: false,
  856. columnSortable: false,
  857. sortLv: 0,
  858. status: true,
  859. fixed: '',
  860. columnWidth: 60
  861. },
  862. {
  863. userId: this.$store.state.user.name,
  864. functionId: 106002,
  865. serialNumber: '106002Table1NodeName',
  866. tableId: "106002Table1",
  867. tableName: "刀具申请主表",
  868. columnProp: "nodeName",
  869. headerAlign: "center",
  870. align: "left",
  871. columnLabel: "节点名称",
  872. columnHidden: false,
  873. columnImage: false,
  874. columnSortable: false,
  875. sortLv: 0,
  876. status: true,
  877. fixed: '',
  878. columnWidth: 120
  879. },
  880. {
  881. userId: this.$store.state.user.name,
  882. functionId: 106002,
  883. serialNumber: '106002Table1ApplySumQty',
  884. tableId: "106002Table1",
  885. tableName: "刀具申请主表",
  886. columnProp: "applySumQty",
  887. headerAlign: "center",
  888. align: "right",
  889. columnLabel: "申请数量",
  890. columnHidden: false,
  891. columnImage: false,
  892. columnSortable: false,
  893. sortLv: 0,
  894. status: true,
  895. fixed: '',
  896. columnWidth: 60
  897. },
  898. {
  899. userId: this.$store.state.user.name,
  900. functionId: 106002,
  901. serialNumber: '106002Table1TotalCost',
  902. tableId: "106002Table1",
  903. tableName: "刀具申请主表",
  904. columnProp: "totalCost",
  905. headerAlign: "center",
  906. align: "right",
  907. columnLabel: "总成本",
  908. columnHidden: false,
  909. columnImage: false,
  910. columnSortable: false,
  911. sortLv: 0,
  912. status: true,
  913. fixed: '',
  914. columnWidth: 60
  915. },
  916. {
  917. userId: this.$store.state.user.name,
  918. functionId: 106002,
  919. serialNumber: '106002Table1QuoterName',
  920. tableId: "106002Table1",
  921. tableName: "刀具申请主表",
  922. columnProp: "quoterName",
  923. headerAlign: "center",
  924. align: "left",
  925. columnLabel: "报价员",
  926. columnHidden: false,
  927. columnImage: false,
  928. columnSortable: false,
  929. sortLv: 0,
  930. status: true,
  931. fixed: '',
  932. columnWidth: 60
  933. },
  934. {
  935. userId: this.$store.state.user.name,
  936. functionId: 106002,
  937. serialNumber: '106002Table1TpName',
  938. tableId: "106002Table1",
  939. tableName: "刀具申请主表",
  940. columnProp: "tpName",
  941. headerAlign: "center",
  942. align: "left",
  943. columnLabel: "TP",
  944. columnHidden: false,
  945. columnImage: false,
  946. columnSortable: false,
  947. sortLv: 0,
  948. status: true,
  949. fixed: '',
  950. columnWidth: 60
  951. },
  952. {
  953. userId: this.$store.state.user.name,
  954. functionId: 106002,
  955. serialNumber: '106002Table1PurchaserName',
  956. tableId: "106002Table1",
  957. tableName: "刀具申请主表",
  958. columnProp: "purchaserName",
  959. headerAlign: "center",
  960. align: "left",
  961. columnLabel: "采购员",
  962. columnHidden: false,
  963. columnImage: false,
  964. columnSortable: false,
  965. sortLv: 0,
  966. status: true,
  967. fixed: '',
  968. columnWidth: 60
  969. },
  970. {
  971. userId: this.$store.state.user.name,
  972. functionId: 106002,
  973. serialNumber: '106002Table1ApplyDate',
  974. tableId: "106002Table1",
  975. tableName: "刀具申请主表",
  976. columnProp: "applyDate",
  977. headerAlign: "center",
  978. align: "left",
  979. columnLabel: "申请日期",
  980. columnHidden: false,
  981. columnImage: false,
  982. columnSortable: false,
  983. sortLv: 0,
  984. status: true,
  985. fixed: '',
  986. columnWidth: 80
  987. },
  988. {
  989. userId: this.$store.state.user.name,
  990. functionId: 106002,
  991. serialNumber: '106002Table1ApplyReason',
  992. tableId: "106002Table1",
  993. tableName: "刀具申请主表",
  994. columnProp: "applyReason",
  995. headerAlign: "center",
  996. align: "left",
  997. columnLabel: "申请原因",
  998. columnHidden: false,
  999. columnImage: false,
  1000. columnSortable: false,
  1001. sortLv: 0,
  1002. status: true,
  1003. fixed: '',
  1004. columnWidth: 150
  1005. },
  1006. {
  1007. userId: this.$store.state.user.name,
  1008. functionId: 106002,
  1009. serialNumber: '106002Table1Remark',
  1010. tableId: "106002Table1",
  1011. tableName: "刀具申请主表",
  1012. columnProp: "remark",
  1013. headerAlign: "center",
  1014. align: "left",
  1015. columnLabel: "申请备注",
  1016. columnHidden: false,
  1017. columnImage: false,
  1018. columnSortable: false,
  1019. sortLv: 0,
  1020. status: true,
  1021. fixed: '',
  1022. columnWidth: 200
  1023. },
  1024. ],
  1025. columnList2: [
  1026. {
  1027. userId: this.$store.state.user.name,
  1028. functionId: 106002,
  1029. serialNumber: '106002Table2SeqNo',
  1030. tableId: '106002Table2',
  1031. tableName: '工具申请明细',
  1032. columnProp: 'seqNo',
  1033. headerAlign: 'center',
  1034. align: 'center',
  1035. columnLabel: '序号',
  1036. columnHidden: false,
  1037. columnImage: false,
  1038. columnSortable: false,
  1039. sortLv: 0,
  1040. status: true,
  1041. fixed: '',
  1042. columnWidth: 40
  1043. },
  1044. {
  1045. userId: this.$store.state.user.name,
  1046. functionId: 106002,
  1047. serialNumber: '106002Table2QuotationNo',
  1048. tableId: '106002Table2',
  1049. tableName: '工具申请明细',
  1050. columnProp: 'orderRef1',
  1051. headerAlign: 'center',
  1052. align: 'center',
  1053. columnLabel: '项目编码',
  1054. columnHidden: false,
  1055. columnImage: false,
  1056. columnSortable: false,
  1057. sortLv: 0,
  1058. status: true,
  1059. fixed: '',
  1060. columnWidth: 100
  1061. },
  1062. {
  1063. userId: this.$store.state.user.name,
  1064. functionId: 106002,
  1065. serialNumber: '106002Table2ToolNo',
  1066. tableId: '106002Table2',
  1067. tableName: '工具申请明细',
  1068. columnProp: 'toolId',
  1069. headerAlign: 'center',
  1070. align: 'center',
  1071. columnLabel: '工具编码',
  1072. columnHidden: false,
  1073. columnImage: false,
  1074. columnSortable: false,
  1075. sortLv: 0,
  1076. status: true,
  1077. fixed: '',
  1078. columnWidth: 70
  1079. },
  1080. {
  1081. userId: this.$store.state.user.name,
  1082. functionId: 106002,
  1083. serialNumber: '106002Table2ToolDescription',
  1084. tableId: '106002Table2',
  1085. tableName: '工具申请明细',
  1086. columnProp: 'toolDesc',
  1087. headerAlign: 'center',
  1088. align: 'center',
  1089. columnLabel: '工具描述',
  1090. columnHidden: false,
  1091. columnImage: false,
  1092. columnSortable: false,
  1093. sortLv: 0,
  1094. status: true,
  1095. fixed: '',
  1096. columnWidth: 120
  1097. },
  1098. {
  1099. userId: this.$store.state.user.name,
  1100. functionId: 106002,
  1101. serialNumber: '106002Table2ApplyQty',
  1102. tableId: '106002Table2',
  1103. tableName: '工具申请明细',
  1104. columnProp: 'applyQty',
  1105. headerAlign: 'center',
  1106. align: 'center',
  1107. columnLabel: '申请数量',
  1108. columnHidden: false,
  1109. columnImage: false,
  1110. columnSortable: false,
  1111. sortLv: 0,
  1112. status: true,
  1113. fixed: '',
  1114. columnWidth: 80
  1115. },
  1116. {
  1117. userId: this.$store.state.user.name,
  1118. functionId: 106002,
  1119. serialNumber: '106002Table2UnitCost',
  1120. tableId: '106002Table2',
  1121. tableName: '工具申请明细',
  1122. columnProp: 'standardCost',
  1123. headerAlign: 'center',
  1124. align: 'center',
  1125. columnLabel: '工具成本',
  1126. columnHidden: false,
  1127. columnImage: false,
  1128. columnSortable: false,
  1129. sortLv: 0,
  1130. status: true,
  1131. fixed: '',
  1132. columnWidth: 80
  1133. },
  1134. {
  1135. userId: this.$store.state.user.name,
  1136. functionId: 106002,
  1137. serialNumber: '106002Table2QuotationNo',
  1138. tableId: '106002Table2',
  1139. tableName: '工具申请明细',
  1140. columnProp: 'orderRef2',
  1141. headerAlign: 'center',
  1142. align: 'center',
  1143. columnLabel: '物料编码',
  1144. columnHidden: false,
  1145. columnImage: false,
  1146. columnSortable: false,
  1147. sortLv: 0,
  1148. status: true,
  1149. fixed: '',
  1150. columnWidth: 70
  1151. },
  1152. {
  1153. userId: this.$store.state.user.name,
  1154. functionId: 106002,
  1155. serialNumber: '106002Table2PartDesc',
  1156. tableId: '106002Table2',
  1157. tableName: '工具申请明细',
  1158. columnProp: 'partDesc',
  1159. headerAlign: 'center',
  1160. align: 'center',
  1161. columnLabel: '物料描述',
  1162. columnHidden: false,
  1163. columnImage: false,
  1164. columnSortable: false,
  1165. sortLv: 0,
  1166. status: true,
  1167. fixed: '',
  1168. columnWidth: 120
  1169. },
  1170. {
  1171. userId: this.$store.state.user.name,
  1172. functionId: 106002,
  1173. serialNumber: '106002Table2IfsPartNo',
  1174. tableId: '106002Table2',
  1175. tableName: '工具申请明细',
  1176. columnProp: 'ifsPartNo',
  1177. headerAlign: 'center',
  1178. align: 'center',
  1179. columnLabel: 'IFS料号',
  1180. columnHidden: false,
  1181. columnImage: false,
  1182. columnSortable: false,
  1183. sortLv: 0,
  1184. status: true,
  1185. fixed: '',
  1186. columnWidth: 70
  1187. },
  1188. {
  1189. userId: this.$store.state.user.name,
  1190. functionId: 106002,
  1191. serialNumber: '106002Table2CustomerPartNo',
  1192. tableId: '106002Table2',
  1193. tableName: '工具申请明细',
  1194. columnProp: 'customerPartNo',
  1195. headerAlign: 'center',
  1196. align: 'center',
  1197. columnLabel: '客户料号',
  1198. columnHidden: false,
  1199. columnImage: false,
  1200. columnSortable: false,
  1201. sortLv: 0,
  1202. status: true,
  1203. fixed: '',
  1204. columnWidth: 70
  1205. },
  1206. {
  1207. userId: this.$store.state.user.name,
  1208. functionId: 106002,
  1209. serialNumber: '106002Table2QuotationNo',
  1210. tableId: '106002Table2',
  1211. tableName: '工具申请明细',
  1212. columnProp: 'orderRef3',
  1213. headerAlign: 'center',
  1214. align: 'center',
  1215. columnLabel: '工艺路线版本',
  1216. columnHidden: false,
  1217. columnImage: false,
  1218. columnSortable: false,
  1219. sortLv: 0,
  1220. status: true,
  1221. fixed: '',
  1222. columnWidth: 70
  1223. },
  1224. {
  1225. userId: this.$store.state.user.name,
  1226. functionId: 106002,
  1227. serialNumber: '106002Table2QuotationNo',
  1228. tableId: '106002Table2',
  1229. tableName: '工具申请明细',
  1230. columnProp: 'orderRef5',
  1231. headerAlign: 'center',
  1232. align: 'center',
  1233. columnLabel: '替代编码',
  1234. columnHidden: false,
  1235. columnImage: false,
  1236. columnSortable: false,
  1237. sortLv: 0,
  1238. status: true,
  1239. fixed: '',
  1240. columnWidth: 70
  1241. },{
  1242. userId: this.$store.state.user.name,
  1243. functionId: 106002,
  1244. serialNumber: '106002Table2QuotationNo',
  1245. tableId: '106002Table2',
  1246. tableName: '工具申请明细',
  1247. columnProp: 'operationNo',
  1248. headerAlign: 'center',
  1249. align: 'center',
  1250. columnLabel: '工序号',
  1251. columnHidden: false,
  1252. columnImage: false,
  1253. columnSortable: false,
  1254. sortLv: 0,
  1255. status: true,
  1256. fixed: '',
  1257. columnWidth: 70
  1258. },{
  1259. userId: this.$store.state.user.name,
  1260. functionId: 106002,
  1261. serialNumber: '106002Table2QuotationNo',
  1262. tableId: '106002Table2',
  1263. tableName: '工具申请明细',
  1264. columnProp: 'operationName',
  1265. headerAlign: 'center',
  1266. align: 'center',
  1267. columnLabel: '工序',
  1268. columnHidden: false,
  1269. columnImage: false,
  1270. columnSortable: false,
  1271. sortLv: 0,
  1272. status: true,
  1273. fixed: '',
  1274. columnWidth: 70
  1275. },
  1276. ],
  1277. columnFileContentArray: [
  1278. {
  1279. columnProp: 'fileName',
  1280. headeralign: 'left',
  1281. align: 'left',
  1282. columnLabel: '文件名称',
  1283. columnHidden: false,
  1284. columnImage: false,
  1285. columnSortable: false,
  1286. sortLv: 0,
  1287. status: true,
  1288. fixed: false
  1289. // }, {
  1290. // columnProp: 'createdBy',
  1291. // headeralign: 'left',
  1292. // align: 'left',
  1293. // columnLabel: '上传人',
  1294. // columnHidden: false,
  1295. // columnImage: false,
  1296. // columnSortable: true,
  1297. // sortLv: 0,
  1298. // status: true,
  1299. // fixed: false
  1300. }, {
  1301. columnProp: 'createDate',
  1302. headeralign: 'left',
  1303. align: 'left',
  1304. columnLabel: '上传时间',
  1305. columnHidden: false,
  1306. columnImage: false,
  1307. columnSortable: true,
  1308. sortLv: 0,
  1309. status: true,
  1310. fixed: false
  1311. }, {
  1312. columnProp: 'orderRef3',
  1313. headeralign: 'left',
  1314. align: 'left',
  1315. columnLabel: '类型',
  1316. columnHidden: false,
  1317. columnImage: false,
  1318. columnSortable: true,
  1319. sortLv: 0,
  1320. status: true,
  1321. fixed: false
  1322. },
  1323. ],
  1324. approvalList: [],
  1325. rejectOpinion: '',
  1326. submitModalFlag: false,
  1327. }
  1328. },
  1329. watch: {
  1330. // columnList1: {
  1331. // deep: true,
  1332. // handler: function (newV, oldV) {
  1333. // debugger
  1334. //
  1335. // }
  1336. // }
  1337. },
  1338. mounted() {
  1339. this.$nextTick(() => {
  1340. this.height = window.innerHeight - 520;
  1341. })
  1342. },
  1343. methods: {
  1344. // 查询审批信息
  1345. getApprovalList () {
  1346. if (Object.keys(this.currentRow).length !== 0) {
  1347. let tempData = {
  1348. site: this.$store.state.user.site,
  1349. menuId: this.$route.meta.menuId,
  1350. documentNo: this.currentRow.applyNo
  1351. }
  1352. getApprovalList(tempData).then(({data}) => {
  1353. if (data && data.code === 0) {
  1354. this.approvalList = data.rows
  1355. } else {
  1356. this.approvalList = []
  1357. }
  1358. })
  1359. }
  1360. },
  1361. // 获取基础数据列表S
  1362. getBaseList (val, type) {
  1363. this.tagNo = val
  1364. this.tagNo2 = type
  1365. this.$nextTick(() => {
  1366. let strVal = ''
  1367. if (val === 103) {
  1368. if(type==1) {
  1369. strVal = this.dataForm.quoter
  1370. }
  1371. if(type==2) {
  1372. strVal = this.dataForm.tp
  1373. }
  1374. if(type==3) {
  1375. strVal = this.dataForm.purchaser
  1376. }
  1377. }
  1378. this.$refs.baseList.init(val, strVal)
  1379. })
  1380. },
  1381. /* 列表方法的回调 */
  1382. getBaseData (val) {
  1383. if (this.tagNo === 103) {
  1384. if(this.tagNo2==1) {
  1385. this.dataForm.quoter = val.username
  1386. this.dataForm.quoterName = val.user_display
  1387. this.$nextTick(() => {
  1388. this.$triggerInputEvent(this.$refs.quoterName);
  1389. });
  1390. }
  1391. if(this.tagNo2==2) {
  1392. this.dataForm.tp = val.username
  1393. this.dataForm.tpName = val.user_display
  1394. this.$nextTick(() => {
  1395. this.$triggerInputEvent(this.$refs.tpName);
  1396. });
  1397. }
  1398. if(this.tagNo2==3) {
  1399. this.dataForm.purchaser = val.username
  1400. this.dataForm.purchaserName = val.user_display
  1401. this.$nextTick(() => {
  1402. this.$triggerInputEvent(this.$refs.purchaserName);
  1403. });
  1404. }
  1405. }
  1406. },
  1407. //导出excel
  1408. async createExportData() {
  1409. this.searchData.limit = -1
  1410. this.searchData.page = 1
  1411. await searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1412. this.exportList= data.page.list;
  1413. })
  1414. return this.exportList;
  1415. },
  1416. startDownload() {
  1417. // this.exportData = this.dataList
  1418. },
  1419. finishDownload() {
  1420. },
  1421. fields() {
  1422. let json = "{"
  1423. this.columnList1.forEach((item, index) => {
  1424. if (index == this.columnList1.length - 1) {
  1425. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1426. } else {
  1427. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1428. }
  1429. })
  1430. json += "}"
  1431. let s = eval("(" + json + ")")
  1432. return s
  1433. },
  1434. //导出excel
  1435. async createExportData2() {
  1436. return this.contactList;
  1437. },
  1438. startDownload2() {
  1439. // this.exportData = this.dataList
  1440. },
  1441. finishDownload2() {
  1442. },
  1443. fields2() {
  1444. let json = "{"
  1445. this.columnList2.forEach((item, index) => {
  1446. if (index == this.columnList2.length - 1) {
  1447. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1448. } else {
  1449. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1450. }
  1451. })
  1452. json += "}"
  1453. let s = eval("(" + json + ")")
  1454. return s
  1455. },
  1456. // 导出 end
  1457. // 获取数据列表
  1458. search () {
  1459. this.searchData.limit = this.pageSize
  1460. this.searchData.page = this.pageIndex
  1461. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1462. if (data.code == 0) {
  1463. this.dataList1 = data.page.list
  1464. this.pageIndex = data.page.currPage
  1465. this.pageSize = data.page.pageSize
  1466. this.totalPage = data.page.totalCount
  1467. if(this.dataList1.length>0){
  1468. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1469. this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
  1470. }else {
  1471. this.currentRow ={}
  1472. }
  1473. this.refreshCurrentTabTable ()
  1474. }
  1475. this.dataListLoading = false
  1476. })
  1477. },
  1478. //单击切换订单
  1479. changeData(row) {
  1480. this.currentRow = JSON.parse(JSON.stringify(row));
  1481. this.currentRow2 = row;
  1482. this.refreshCurrentTabTable ();
  1483. },
  1484. addUploadFileModal(){
  1485. let currentData = {
  1486. site: this.currentRow.site,
  1487. createBy: this.$store.state.user.name,
  1488. projectId: this.currentRow.applyNo,
  1489. projectName: '',
  1490. remark: '',
  1491. };
  1492. //打开组件 去做新增业务
  1493. this.$nextTick(() => {
  1494. this.$refs.projectUploadFile.init(currentData);
  1495. })
  1496. },
  1497. deleteFile(row){
  1498. this.$confirm('确定要删除此文件?', '提示', {
  1499. confirmButtonText: '确定',
  1500. cancelButtonText: '取消',
  1501. type: 'warning'
  1502. }).then(() => {
  1503. deleteProjectFile(row).then(({data}) => {
  1504. if (data && data.code == 0) {
  1505. this.getFileContentData();
  1506. this.$message({
  1507. message: '操作成功',
  1508. type: 'success',
  1509. duration: 1500,
  1510. onClose: () => {
  1511. }
  1512. })
  1513. } else {
  1514. this.$alert(data.msg, '错误', {
  1515. confirmButtonText: '确定'
  1516. })
  1517. }
  1518. })
  1519. }).catch(() => {
  1520. })
  1521. },
  1522. tabClick (tab, event) {
  1523. // 刷新列表数据
  1524. this.refreshCurrentTabTable()
  1525. },
  1526. // 刷新页签的table数据
  1527. refreshCurrentTabTable () {
  1528. if (this.activeName == 'detail') {
  1529. this.searchToolApplyDetail();
  1530. }
  1531. if (this.activeName == 'down') {
  1532. // this.getFileContentData();
  1533. }
  1534. if (this.activeName === 'approvalInformation') {
  1535. this.getApprovalList()
  1536. }
  1537. },
  1538. searchToolApplyDetail(){
  1539. if(this.currentRow.applyNo){
  1540. searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
  1541. if (data.code == 0) {
  1542. this.detailList = data.rows
  1543. }
  1544. })
  1545. }else {
  1546. this.detailList =[]
  1547. }
  1548. },
  1549. editModal (row) {
  1550. this.getNodeAuthority(row)
  1551. this.dataForm = {
  1552. site: row.site,
  1553. applyNo: row.applyNo,
  1554. applyBy: row.applyBy,
  1555. applyDate: row.applyDate,
  1556. applySumQty: row.applySumQty,
  1557. applyReason: row.applyReason,
  1558. remark: row.remark,
  1559. createBy: row.createBy,
  1560. department:row.department,
  1561. detailList: [],
  1562. status: row.status,
  1563. rejectOpinion: '',
  1564. nodeConclusion: '',
  1565. quoter: row.quoter,
  1566. quoterName: row.quoterName,
  1567. tp: row.tp,
  1568. tpName: row.tpName,
  1569. purchaser: row.purchaser,
  1570. purchaserName: row.purchaserName,
  1571. totalCost:row.totalCost,
  1572. menuId: this.$route.meta.menuId,
  1573. userName: this.$store.state.user.name,
  1574. nodeId: row.nodeId
  1575. }
  1576. this.openModelMessage()
  1577. searchProjectToolApplyDetail({ site: row.site,
  1578. applyNo: row.applyNo,}).then(({data}) => {
  1579. if (data.code == 0) {
  1580. this.toolData = data.rows
  1581. }
  1582. })
  1583. this.visible=true
  1584. },
  1585. editModalU (row) {
  1586. this.getNodeAuthority(row)
  1587. this.dataForm = {
  1588. site: row.site,
  1589. applyNo: row.applyNo,
  1590. applyBy: row.applyBy,
  1591. applyDate: row.applyDate,
  1592. applySumQty: row.applySumQty,
  1593. applyReason: row.applyReason,
  1594. remark: row.remark,
  1595. createBy: row.createBy,
  1596. department:row.department,
  1597. detailList: [],
  1598. status: row.status,
  1599. rejectOpinion: '',
  1600. nodeConclusion: '',
  1601. quoter: row.quoter,
  1602. quoterName: row.quoterName,
  1603. tp: row.tp,
  1604. tpName: row.tpName,
  1605. purchaser: row.purchaser,
  1606. purchaserName: row.purchaserName,
  1607. totalCost:row.totalCost,
  1608. menuId: this.$route.meta.menuId,
  1609. userName: this.$store.state.user.name,
  1610. nodeId: row.nodeId
  1611. }
  1612. this.openModelMessage()
  1613. searchProjectToolApplyDetail({ site: row.site,
  1614. applyNo: row.applyNo,}).then(({data}) => {
  1615. if (data.code == 0) {
  1616. this.toolData = data.rows
  1617. }
  1618. })
  1619. this.visibleU=true
  1620. },
  1621. comfirmApply (row) {
  1622. this.$confirm(`确定下达这个申请`, '提示', {
  1623. confirmButtonText: '确定',
  1624. cancelButtonText: '取消',
  1625. type: 'warning'
  1626. }).then(() => {
  1627. let tempData = {
  1628. site: row.site,
  1629. userName: this.$store.state.user.name,
  1630. applyNo: row.applyNo,
  1631. menuId: this.$route.meta.menuId
  1632. }
  1633. comfirmProjectToolApply(tempData).then(({data}) => {
  1634. if (data && data.code === 0) {
  1635. this.search()
  1636. // row.statusCode = '10'
  1637. // row.status = '下达'
  1638. this.$message({
  1639. message: '操作成功',
  1640. type: 'success',
  1641. duration: 1500,
  1642. onClose: () => {}
  1643. })
  1644. } else {
  1645. this.$alert(data.msg, '错误', {
  1646. confirmButtonText: '确定'
  1647. })
  1648. }
  1649. })
  1650. })
  1651. },
  1652. cancelApply(row){
  1653. this.$confirm(`确定取消这个申请`, '提示', {
  1654. confirmButtonText: '确定',
  1655. cancelButtonText: '取消',
  1656. type: 'warning'
  1657. }).then(() => {
  1658. cancelProjectToolApply(row).then(({data}) => {
  1659. if (data && data.code === 0) {
  1660. this.search();
  1661. this.$message({
  1662. message: '操作成功',
  1663. type: 'success',
  1664. duration: 1500,
  1665. onClose: () => {
  1666. }
  1667. })
  1668. } else {
  1669. this.$alert(data.msg, '错误', {
  1670. confirmButtonText: '确定'
  1671. })
  1672. }
  1673. })
  1674. })
  1675. },
  1676. //刷新派设备文档的列表
  1677. getFileContentData() {
  1678. let currentData = {orderRef2: this.currentRow.applyNo};
  1679. getFileContentList(currentData).then(({data}) => {
  1680. //区分请求成功和失败的状况
  1681. if (data && data.code == 200) {
  1682. this.fileContentList = data.rows;
  1683. } else {
  1684. this.fileContentList = [];
  1685. }
  1686. });
  1687. },
  1688. // 下载
  1689. downloadFile(row){
  1690. // let inData={
  1691. // site:this.currentRow.site,
  1692. // username:this.$store.state.user.name,
  1693. // projectId:this.currentRow.projectId
  1694. // }
  1695. // getProjectUserRole(inData).then(({data}) => {
  1696. // if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  1697. downLoadProjectFile(row)
  1698. .then(({data}) => {
  1699. // 不限制文件下载类型
  1700. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1701. // 下载文件名称
  1702. const fileName = row.fileName
  1703. // a标签下载
  1704. const linkNode = document.createElement('a')
  1705. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1706. linkNode.style.display = 'none'
  1707. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1708. console.log(linkNode)
  1709. // if(val == 'Y'){
  1710. // this.pdfVisible = true
  1711. // this.pdfUrl = linkNode.href
  1712. // }else {
  1713. document.body.appendChild(linkNode)
  1714. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1715. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1716. document.body.removeChild(linkNode)
  1717. // }
  1718. })
  1719. // }else {
  1720. // this.$alert('没有权限下载这个项目的文件!', '错误', {
  1721. // confirmButtonText: '确定'
  1722. // })
  1723. // }
  1724. // })
  1725. },
  1726. // 每页数
  1727. sizeChangeHandle (val) {
  1728. this.pageSize = val
  1729. this.pageIndex = 1
  1730. this.search()
  1731. },
  1732. // 当前页
  1733. currentChangeHandle (val) {
  1734. this.pageIndex = val
  1735. this.search()
  1736. },
  1737. openModelMessage(){
  1738. this.modelData={
  1739. site:this.currentRow.site,
  1740. applyNo:this.currentRow.applyNo,
  1741. prNo:this.currentRow.prNo,
  1742. remark1:this.currentRow.remark1,
  1743. poNo:this.currentRow.poNo,
  1744. supplierName:this.currentRow.supplierName,
  1745. allCost:this.currentRow.allCost,
  1746. remark2:this.currentRow.remark2,
  1747. }
  1748. },
  1749. openMassageModel(){
  1750. if(Object.keys(this.currentRow).length === 0){
  1751. this.$alert('未选择记录!', '错误', {
  1752. confirmButtonText: '确定'
  1753. })
  1754. return false;
  1755. }
  1756. this.modelData={
  1757. site:this.currentRow.site,
  1758. applyNo:this.currentRow.applyNo,
  1759. prNo:this.currentRow.prNo,
  1760. remark1:this.currentRow.remark1,
  1761. poNo:this.currentRow.poNo,
  1762. supplierName:this.currentRow.supplierName,
  1763. allCost:this.currentRow.allCost,
  1764. remark2:this.currentRow.remark2,
  1765. }
  1766. this.modelFlag=true
  1767. },
  1768. changeSum() {
  1769. if(row.standardCost<0||row.standardCost==null||row.standardCost==''){
  1770. row.standardCost=''
  1771. this.$alert('成本不能为负数或者不填', '错误', {
  1772. confirmButtonText: '确定'
  1773. })
  1774. }
  1775. this.dataForm.applySumQty = 0
  1776. this.dataForm.totalCost =0
  1777. for (const item of this.toolData) {
  1778. // 累加之前先确保值存在,并将 null 或 undefined 转换为0
  1779. this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
  1780. this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0);
  1781. }
  1782. },
  1783. saveHeaderMessage(){
  1784. this.$confirm('确定是否保存','提示',{
  1785. confirmButtonText:'确定',
  1786. cancelButtonText:'取消',
  1787. type:'warning'
  1788. }).then(()=>{
  1789. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  1790. if (data && data.code == 0) {
  1791. this.modelFlag=false;
  1792. this.currentRow.prNo=this.modelData.prNo
  1793. this.currentRow.remark1=this.modelData.remark1
  1794. this.currentRow.poNo=this.modelData.poNo
  1795. this.currentRow.supplierName=this.modelData.supplierName
  1796. this.currentRow.allCost=this.modelData.allCost
  1797. this.currentRow.totalCost=this.modelData.totalCost
  1798. this.currentRow.remark2=this.modelData.remark2
  1799. this.$message({
  1800. message: '操作成功',
  1801. type: 'success',
  1802. duration: 1500,
  1803. onClose: () => {
  1804. }
  1805. })
  1806. } else {
  1807. this.$alert(data.msg, '错误', {
  1808. confirmButtonText: '确定'
  1809. })
  1810. }
  1811. })
  1812. })
  1813. },
  1814. saveHeaderMessage2(){
  1815. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  1816. if (data && data.code == 0) {
  1817. this.modelFlag=false;
  1818. this.currentRow.prNo=this.modelData.prNo
  1819. this.currentRow.remark1=this.modelData.remark1
  1820. this.currentRow.poNo=this.modelData.poNo
  1821. this.currentRow.supplierName=this.modelData.supplierName
  1822. this.currentRow.allCost=this.modelData.allCost
  1823. this.currentRow.totalCost=this.modelData.totalCost
  1824. this.currentRow.remark2=this.modelData.remark2
  1825. this.$message({
  1826. message: '操作成功',
  1827. type: 'success',
  1828. duration: 1500,
  1829. onClose: () => {
  1830. }
  1831. })
  1832. } else {
  1833. this.$alert(data.msg, '错误', {
  1834. confirmButtonText: '确定'
  1835. })
  1836. }
  1837. })
  1838. },
  1839. // 同意提交
  1840. agreeSubmit () {
  1841. this.$confirm(`是否确认提交?`, '提示', {
  1842. confirmButtonText: '确定',
  1843. cancelButtonText: '取消',
  1844. type: 'warning'
  1845. }).then(() => {
  1846. this.dataForm.nodeConclusion = 'Y'
  1847. this.submitData()
  1848. })
  1849. },
  1850. // 打开提交模态框
  1851. submitDataModal () {
  1852. this.rejectOpinion = ''
  1853. this.submitModalFlag = true
  1854. },
  1855. // 驳回提交
  1856. rejectSubmit () {
  1857. this.$confirm(`是否确认驳回?`, '提示', {
  1858. confirmButtonText: '确定',
  1859. cancelButtonText: '取消',
  1860. type: 'warning'
  1861. }).then(() => {
  1862. this.dataForm.rejectOpinion = this.rejectOpinion
  1863. this.dataForm.nodeConclusion = 'N'
  1864. this.submitData()
  1865. })
  1866. },
  1867. // 提交
  1868. submitData () {
  1869. this.dataForm.userName = this.$store.state.user.name
  1870. this.dataForm.menuId = this.$route.meta.menuId
  1871. this.dataForm.detailList = this.toolData
  1872. submitChange(this.dataForm).then(({data}) => {
  1873. if (data && data.code === 0) {
  1874. this.saveHeaderMessage2()
  1875. for (let i = 0; i <this.dataList1.length ; i++) {
  1876. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1877. this.dataList1[i].remark = this.dataForm.remark
  1878. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1879. this.dataList1[i].applyReason = this.dataForm.applyReason
  1880. }
  1881. }
  1882. this.search();
  1883. this.refreshCurrentTabTable()
  1884. this.submitModalFlag = false
  1885. this.visible = false
  1886. this.$message({
  1887. message: '操作成功',
  1888. type: 'success',
  1889. duration: 1500,
  1890. onClose: () => {
  1891. }
  1892. })
  1893. } else {
  1894. this.$alert(data.msg, '错误', {
  1895. confirmButtonText: '确定'
  1896. })
  1897. }
  1898. })
  1899. },
  1900. saveData () {
  1901. this.dataForm.detailList = this.toolData
  1902. editToolApplication(this.dataForm).then(({data}) => {
  1903. if (data && data.code === 0) {
  1904. this.saveHeaderMessage2()
  1905. for (let i = 0; i <this.dataList1.length ; i++) {
  1906. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1907. this.dataList1[i].remark = this.dataForm.remark
  1908. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1909. this.dataList1[i].applyReason = this.dataForm.applyReason
  1910. this.dataList1[i].quoter = this.dataForm.quoter
  1911. this.dataList1[i].tp = this.dataForm.tp
  1912. this.dataList1[i].totalCost = this.dataForm.totalCost
  1913. this.dataList1[i].purchaser = this.dataForm.purchaser
  1914. this.dataList1[i].quoterName = this.dataForm.quoterName
  1915. this.dataList1[i].tpName = this.dataForm.tpName
  1916. this.dataList1[i].purchaserName = this.dataForm.purchaserName
  1917. }
  1918. }
  1919. this.visible = false
  1920. this.visibleU = false
  1921. this.refreshCurrentTabTable()
  1922. this.$message({
  1923. message: '操作成功',
  1924. type: 'success',
  1925. duration: 1500,
  1926. onClose: () => {
  1927. }
  1928. })
  1929. } else {
  1930. this.$alert(data.msg, '错误', {
  1931. confirmButtonText: '确定'
  1932. })
  1933. }
  1934. })
  1935. },
  1936. jumpBM(row){
  1937. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404'){
  1938. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  1939. }else {
  1940. let inData={
  1941. site:row.site,
  1942. testPartNo:row.orderRef2
  1943. }
  1944. getProjectPartNowBm(inData).then(({data}) => {
  1945. //区分请求成功和失败的状况
  1946. if (data && data.code == 0) {
  1947. if(data.rows==null||data.rows.length==0){
  1948. this.$alert('该物料没有benchmark', '警告', {confirmButtonText: '确定',});
  1949. }
  1950. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo:data.rows[0].nowBm},})
  1951. } else {
  1952. }
  1953. });
  1954. }
  1955. },
  1956. // 获取流程的配置权限
  1957. async getNodeAuthority (row) {
  1958. let tempData = {
  1959. site: row.site,
  1960. stepId: row.stepId,
  1961. menuId: this.$route.meta.menuId
  1962. }
  1963. await getNodeAuthority(tempData).then(({data}) => {
  1964. if (data && data.code === 0) {
  1965. // this.plmChangeRequestArr = data.rows.plm_change_request
  1966. // this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  1967. // this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  1968. // this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  1969. // this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  1970. // this.plmChangeItemArr = data.rows.plm_change_item
  1971. // this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
  1972. }
  1973. })
  1974. },
  1975. },
  1976. activated() {
  1977. if (this.$route.params.type === 'tokenLogin') {
  1978. console.log("进来啦")
  1979. if (this.$route.params.docNo) {
  1980. this.searchData.applyNo = this.$route.params.docNo
  1981. }
  1982. this.searchData.limit = this.pageSize
  1983. this.searchData.page = this.pageIndex
  1984. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1985. if (data.code == 0) {
  1986. this.dataList1 = data.page.list
  1987. this.pageIndex = data.page.currPage
  1988. this.pageSize = data.page.pageSize
  1989. this.totalPage = data.page.totalCount
  1990. if(this.dataList1.length>0){
  1991. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1992. this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
  1993. //进入审批界面
  1994. this.editModal(this.dataList1[0])
  1995. }else {
  1996. this.currentRow ={}
  1997. }
  1998. this.refreshCurrentTabTable ()
  1999. }
  2000. this.dataListLoading = false
  2001. })
  2002. }
  2003. if (localStorage.getItem('ToolApplyData') != null&&localStorage.getItem('ToolApplyData') != undefined) {
  2004. let data = JSON.parse(localStorage.getItem('ToolApplyData'));
  2005. if (data){
  2006. this.searchData.applyNo = data.applyNo
  2007. }
  2008. this.searchData.limit = this.pageSize
  2009. this.searchData.page = this.pageIndex
  2010. console.log(this.searchData)
  2011. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  2012. if (data.code == 0) {
  2013. this.dataList1 = data.page.list
  2014. this.pageIndex = data.page.currPage
  2015. this.pageSize = data.page.pageSize
  2016. this.totalPage = data.page.totalCount
  2017. if(this.dataList1.length>0){
  2018. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  2019. this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
  2020. //进入编辑界面
  2021. this.editModalU(this.dataList1[0])
  2022. }else {
  2023. this.currentRow ={}
  2024. }
  2025. this.refreshCurrentTabTable ()
  2026. }
  2027. this.dataListLoading = false
  2028. })
  2029. localStorage.removeItem('ToolApplyData');
  2030. }
  2031. },
  2032. }
  2033. </script>
  2034. <style >
  2035. .el-transfer-panel {
  2036. border: 2px solid #17b3a3;
  2037. border-radius: 4px;
  2038. overflow: hidden;
  2039. background: #fff;
  2040. display: inline-block;
  2041. vertical-align: middle;
  2042. width: 200px;
  2043. max-height: 100%;
  2044. -webkit-box-sizing: border-box;
  2045. box-sizing: border-box;
  2046. position: relative;
  2047. }
  2048. .el-transfer-panel .el-transfer-panel__header {
  2049. height: 40px;
  2050. line-height: 40px;
  2051. background: #17b3a3;
  2052. margin: 0;
  2053. padding-left: 15px;
  2054. border-bottom: 1px solid #17b3a3;
  2055. -webkit-box-sizing: border-box;
  2056. box-sizing: border-box;
  2057. color: #000;
  2058. }
  2059. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  2060. font-size: 14px;
  2061. color: #303133;
  2062. font-weight: 400;
  2063. }
  2064. </style>