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.

3844 lines
130 KiB

9 months ago
2 years ago
9 months ago
9 months ago
9 months ago
9 months ago
1 year ago
9 months ago
9 months ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
7 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
8 months ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
9 months ago
2 years ago
9 months ago
2 years ago
1 year ago
9 months ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
9 months ago
2 years ago
1 year ago
9 months ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
9 months ago
1 year ago
9 months ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
8 months ago
8 months ago
11 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
9 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
7 months ago
2 years ago
7 months ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
7 months ago
2 years ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
9 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
8 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
9 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
9 months ago
2 years ago
1 year ago
2 years ago
9 months ago
2 years ago
9 months ago
2 years ago
1 year ago
9 months ago
2 years ago
9 months ago
2 years ago
9 months ago
2 years ago
9 months ago
1 year ago
9 months ago
1 year ago
9 months ago
1 year ago
7 months ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
11 months ago
2 years ago
1 year ago
2 years ago
1 year ago
9 months ago
2 years ago
9 months ago
1 year ago
2 years ago
9 months ago
2 years ago
1 year ago
9 months ago
2 years ago
1 year ago
1 year ago
9 months ago
1 year ago
9 months ago
1 year ago
9 months ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
7 months ago
7 months ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
7 months ago
2 years ago
7 months ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
7 months ago
2 years ago
2 years ago
1 year ago
11 months ago
8 months ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
9 months ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
11 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
7 months ago
7 months ago
7 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item label="BU">
  6. <bu-select v-model="searchData.buNo" style="width: 120px"></bu-select>
  7. </el-form-item>
  8. <el-form-item :label="'打样单号'">
  9. <el-input v-model="searchData.proofingNo" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'项目号'">
  12. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'项目名称'">
  15. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'客户编码'">
  18. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'客户名称'">
  21. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'要求交付日期'">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.startDate"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="开始日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item :label="' '">
  33. <el-date-picker
  34. style="width: 120px"
  35. v-model="searchData.endDate"
  36. type="date"
  37. value-format="yyyy-MM-dd"
  38. placeholder="结束日期">
  39. </el-date-picker>
  40. </el-form-item>
  41. </el-form>
  42. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  43. <el-form-item :label="'PLM物料编码'">
  44. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  45. </el-form-item>
  46. <el-form-item :label="'IFS物料编码'">
  47. <el-input v-model="searchData.finalPartNo" clearable style="width: 120px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'客户物料编码'">
  50. <el-input v-model="searchData.customerPartNo" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'物料名称'">
  53. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  54. </el-form-item>
  55. <el-form-item :label="'CS'">
  56. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  57. </el-form-item>
  58. <el-form-item :label="'NPI工程师'">
  59. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  60. </el-form-item>
  61. <el-form-item :label="'Approver'">
  62. <el-input v-model="searchData.approverName" clearable style="width: 120px"></el-input>
  63. </el-form-item>
  64. <!-- <el-form-item :label="'优先等级'">-->
  65. <!-- <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false" dict-type="priority_Level"></dict-data-select>-->
  66. <!-- </el-form-item>-->
  67. <el-form-item :label="'状态'">
  68. <el-select v-model="searchData.proofingStatus" style="width: 120px">
  69. <el-option label="全部" value=""></el-option>
  70. <el-option label="草稿" value="草稿"></el-option>
  71. <el-option label="审批中" value="审批中"></el-option>
  72. <el-option label="已完成" value="已完成"></el-option>
  73. </el-select>
  74. </el-form-item>
  75. <el-form-item :label="' '">
  76. <el-button @click="getDataList()">查询</el-button>
  77. <el-button v-if="isAuth('103001:save')" type="primary" @click="addModal()">新增</el-button>
  78. <el-button v-if="isAuth('103001:remove')" type="primary" @click="delModal()">删除</el-button>
  79. <download-excel
  80. v-if="isAuth('103001:export')"
  81. :fields="fields()"
  82. :data="exportData"
  83. type="xls"
  84. :name="exportName"
  85. :header="exportHeader"
  86. :footer="exportFooter"
  87. :fetch="createExportData"
  88. :before-generate="startDownload"
  89. :before-finish="finishDownload"
  90. worksheet="导出信息"
  91. class="el-button el-button--primary el-button--medium">
  92. {{ "导出" }}
  93. </download-excel>
  94. <el-button @click="filterVisible = true">搜索</el-button>
  95. </el-form-item>
  96. </el-form>
  97. <!-- 打样列表 -->
  98. <el-table
  99. :height="height"
  100. :data="dataList"
  101. border
  102. :row-style="rowStyle"
  103. ref="proofingTable"
  104. @row-click="proofingClickRow"
  105. @selection-change="selectionProofing"
  106. @current-change="changeCurrentRow"
  107. v-loading="dataListLoading"
  108. style="width: 100%;">
  109. <el-table-column
  110. type="selection"
  111. header-align="center"
  112. align="center"
  113. :selectable="selectFlag"
  114. width="50">
  115. </el-table-column>
  116. <el-table-column
  117. v-for="(item,index) in columnList" :key="index"
  118. :sortable="item.columnSortable"
  119. :prop="item.columnProp"
  120. :header-align="item.headerAlign"
  121. :show-overflow-tooltip="item.showOverflowTooltip"
  122. :align="item.align"
  123. :fixed="item.fixed === ''?false:item.fixed"
  124. :min-width="item.columnWidth"
  125. :label="item.columnLabel">
  126. <template slot-scope="scope">
  127. <div v-if="item.columnProp === 'proofingResultStatus'">
  128. <span v-if="!item.columnHidden">
  129. <span v-show="scope.row.proofingResultStatus === 'B'">草稿</span>
  130. <span v-show="scope.row.proofingResultStatus === 'C'">已下达</span>
  131. <span v-show="scope.row.proofingResultStatus === 'E'">已完成打样</span>
  132. <span v-show="scope.row.proofingResultStatus === 'S'">已提交打样</span>
  133. <span v-show="scope.row.proofingResultStatus === 'R'">客户已反馈</span>
  134. </span>
  135. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  136. style="width: 100px; height: 80px"/></span>
  137. </div>
  138. <div v-else>
  139. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  140. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  141. style="width: 100px; height: 80px"/></span>
  142. </div>
  143. </template>
  144. </el-table-column>
  145. <el-table-column
  146. fixed="right"
  147. header-align="center"
  148. align="center"
  149. width="100"
  150. label="操作">
  151. <template slot-scope="scope">
  152. <template v-if="isAuth('103001:update')">
  153. <el-link style="cursor: pointer" @click="updateModal(scope.row)" v-if="scope.row.proofingStatus !== '已完成'">编辑</el-link>
  154. </template>
  155. <template v-if="isAuth('103001:issued')">
  156. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '草稿'" @click="updateModalStatus(scope.row,'C')">下达</el-link>
  157. </template>
  158. <template v-if="isAuth('103001:detail')">
  159. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '已完成'" @click="getDetailData(scope.row)">详情</el-link>
  160. </template>
  161. </template>
  162. </el-table-column>
  163. </el-table>
  164. <selectDiv ref="selectDiv"></selectDiv>
  165. <!-- 分页插件 -->
  166. <el-pagination style="margin-top: 0px"
  167. @size-change="sizeChangeHandle"
  168. @current-change="currentChangeHandle"
  169. :current-page="pageIndex"
  170. :page-sizes="[20, 50, 100, 200, 500]"
  171. :page-size="pageSize"
  172. :total="totalPage"
  173. layout="total, sizes, prev, pager, next, jumper">
  174. </el-pagination>
  175. <!-- 打样模态框 -->
  176. <el-dialog :title="modalData.title" @close="closeModalDiaLog" @open="openModalDialog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" top="10vh" width="1200px">
  177. <el-form label-position="top" ref="modalForm" :model="modalData" :rules="rules">
  178. <el-row :gutter="15">
  179. <el-col :span="8">
  180. <el-row :gutter="10">
  181. <el-col :span="10">
  182. <el-form-item prop="customerNo" label="客户编码" :show-message="false">
  183. <span style="cursor: pointer" slot="label" v-if="modalData.flag === '1'"
  184. @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  185. <el-input :disabled="modalData.flag !== '1' && columnFlagByHeader('customerNo')"
  186. v-model="modalData.customerNo" @blur="handleQueryCustomer"></el-input>
  187. </el-form-item>
  188. </el-col>
  189. <el-col :span="14">
  190. <el-form-item label=" " :show-message="false">
  191. <el-input disabled v-model="modalData.customerDesc"></el-input>
  192. </el-form-item>
  193. </el-col>
  194. </el-row>
  195. </el-col>
  196. <el-col :span="4">
  197. <el-form-item label="打样数量" prop="proofingNumber" :show-message="false">
  198. <el-input-number :controls="false" :disabled="detailVisible" :min="0" v-model="modalData.proofingNumber" :step="0" style="width: 100%"></el-input-number>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="4">
  202. <el-form-item label="打样金额" prop="proofingAmount" :show-message="false">
  203. <el-input-number :controls="false" :disabled="detailVisible" v-model="modalData.proofingAmount" :step="0" style="width: 100%"></el-input-number>
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="4">
  207. <el-form-item label="优先等级" :show-message="false">
  208. <dict-data-select v-if="modalFlag" :disabled="columnFlagByHeader('priorityLevel') || detailVisible"
  209. v-model="modalData.priorityLevel"
  210. dict-type="priority_Level"></dict-data-select>
  211. </el-form-item>
  212. </el-col>
  213. <el-col :span="4">
  214. <el-form-item label="要求交付日期" prop="requiredDeliveryDate" :show-message="false">
  215. <el-date-picker v-model="modalData.requiredDeliveryDate" style="width: 100%" type="date"
  216. value-format="yyyy-MM-dd" placeholder="选择日期"
  217. :disabled="columnFlagByHeader('requiredDeliveryDate') || detailVisible"></el-date-picker>
  218. </el-form-item>
  219. </el-col>
  220. </el-row>
  221. <el-row :gutter="15">
  222. <el-col :span="8">
  223. <el-row :gutter="10">
  224. <el-col :span="10">
  225. <el-form-item prop="projectId" label="项目号" :show-message="false">
  226. <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'"
  227. @click="chooseProjectListFlag = true"><a herf="#">项目号</a></span>
  228. <el-input :disabled="(!modalData.customerNo || modalData.flag !== '1')"
  229. v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
  230. </el-form-item>
  231. </el-col>
  232. <el-col :span="14">
  233. <el-form-item label=" " :show-message="false">
  234. <el-input disabled v-model="modalData.projectName"></el-input>
  235. </el-form-item>
  236. </el-col>
  237. </el-row>
  238. </el-col>
  239. <el-col :span="4">
  240. <el-form-item :show-message="false" prop="trackerName">
  241. <label v-if="columnFlagByHeader('tracker') || detailVisible" slot="label">CS</label>
  242. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  243. <el-input v-model="modalData.trackerName" :disabled="columnFlagByHeader('tracker') || detailVisible" readonly>
  244. <span slot="suffix" v-show="modalData.trackerName && !detailVisible" @click="clearModalData('tracker')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  245. </el-input>
  246. </el-form-item>
  247. </el-col>
  248. <el-col :span="4">
  249. <el-form-item :show-message="false">
  250. <label v-if="columnFlagByHeader('engineer') || detailVisible" slot="label">NPI工程师</label>
  251. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2052)"><a>NPI工程师</a></span>
  252. <el-input v-model="modalData.engineerName" :disabled="columnFlagByHeader('engineer') || detailVisible" readonly>
  253. <span slot="suffix" v-show="modalData.engineerName && !detailVisible" @click="clearModalData('engineer')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  254. </el-input>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="4">
  258. <el-form-item>
  259. <label v-if="columnFlagByHeader('approver') || detailVisible" slot="label">Approver</label>
  260. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2053)"><a herf="#">Approver</a></span>
  261. <el-input v-model="modalData.approverName" :disabled="columnFlagByHeader('approver') || detailVisible" readonly>
  262. <span slot="suffix" v-show="modalData.approverName && !detailVisible" @click="clearModalData('approver')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  263. </el-input>
  264. </el-form-item>
  265. </el-col>
  266. <el-col :span="4">
  267. <el-form-item>
  268. <label v-if="columnFlagByDelegateAccess('delegateAccess') || detailVisible" slot="label">DelegateAccess</label>
  269. <span v-else style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
  270. <el-input v-model="delegateAccessName" :disabled="columnFlagByDelegateAccess('delegateAccess') || detailVisible" readonly>
  271. <span slot="suffix" v-show="delegateAccessName && !detailVisible" @click="selectionDelegateAccess = []"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  272. </el-input>
  273. </el-form-item>
  274. </el-col>
  275. </el-row>
  276. <el-row :gutter="15">
  277. <el-col :span="24">
  278. <el-form-item label="样品寄送地址" class="auto">
  279. <el-input type="textarea" v-model="modalData.sendSamplesAddress" :disabled="detailVisible" :rows="3" resize='none' show-word-limit></el-input>
  280. </el-form-item>
  281. </el-col>
  282. </el-row>
  283. <el-row :gutter="15">
  284. <el-col :span="24">
  285. <el-form-item label="备注" style="height: 90px">
  286. <el-input type="textarea" v-model="modalData.technicalConsiderations" :disabled="detailVisible" :rows="3" resize='none' show-word-limit></el-input>
  287. </el-form-item>
  288. </el-col>
  289. </el-row>
  290. </el-form>
  291. <div class="rq">
  292. <el-form :inline="true" label-position="top" :model="projectPartData" v-if="modalData.flag === '1'">
  293. <el-form-item label="PLM物料编码">
  294. <el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
  295. </el-form-item>
  296. <el-form-item label="物料名称">
  297. <el-input v-model="projectPartData.partName" clearable style="width: 120px"></el-input>
  298. </el-form-item>
  299. <el-form-item label="IFS物料编码">
  300. <el-input v-model="projectPartData.finalPartNo" clearable style="width: 120px"></el-input>
  301. </el-form-item>
  302. <el-form-item label="客户料号">
  303. <el-input v-model="projectPartData.customerPartNo" clearable style="width: 120px"></el-input>
  304. </el-form-item>
  305. <el-form-item label=" " v-if="modalData.projectId">
  306. <el-button type="primary" @click="getProjectPartList">查询</el-button>
  307. </el-form-item>
  308. </el-form>
  309. <el-table
  310. :height="300"
  311. :data="projectPartList"
  312. ref="projectPartTable"
  313. @row-click="projectPartClickRow"
  314. @selection-change="selectionProjectPart"
  315. :row-key="getRowKeys"
  316. border
  317. v-loading="queryLoading"
  318. style="width: 100%;">
  319. <el-table-column
  320. type="selection"
  321. header-align="center"
  322. align="center"
  323. :selectable="checkSelectable"
  324. :reserve-selection="true"
  325. width="50">
  326. </el-table-column>
  327. <el-table-column
  328. v-for="(item,index) in projectPartDetailList" :key="index"
  329. :sortable="item.columnSortable"
  330. :prop="item.columnProp"
  331. :header-align="item.headerAlign"
  332. :show-overflow-tooltip="item.showOverflowTooltip"
  333. :align="item.align"
  334. :fixed="item.fixed===''?false:item.fixed"
  335. :min-width="item.columnWidth"
  336. :label="item.columnLabel">
  337. <template slot-scope="scope">
  338. <template v-if="item.columnProp === 'testPartNo'">
  339. <a @click="handleRouter(scope.row)">{{ scope.row[item.columnProp] }}</a>
  340. </template>
  341. <template v-else>
  342. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  343. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  344. </template>
  345. </template>
  346. </el-table-column>
  347. </el-table>
  348. </div>
  349. <el-pagination style="margin-top: 0"
  350. @size-change="handleSizeChange"
  351. @current-change="handleCurrentChange"
  352. :current-page="no"
  353. :page-sizes="[20, 50, 100, 200, 500]"
  354. :page-size="size"
  355. :total="total"
  356. layout="total, sizes, prev, pager, next, jumper">
  357. </el-pagination>
  358. <el-footer style="height:30px;text-align:center;margin-top: 8px">
  359. <template v-if="modalData.proofingStatus === '草稿' || (modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name) && modalData.proofingStatus === '审批中')">
  360. <el-button type="primary" @click="saveData()">保存</el-button>
  361. </template>
  362. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  363. <template v-if="superAdmin || (modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name))">
  364. <template v-if="isAuth('103001:submit')">
  365. <el-button v-if="modalData.proofingStatus === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  366. </template>
  367. <template v-if="isAuth('103001:rejected')">
  368. <el-button v-if="modalData.proofingStatus === '审批中' && modalData.isReject === 'Y'" @click="rejectVisible = true" type="primary">驳回</el-button>
  369. </template>
  370. </template>
  371. </el-footer>
  372. </el-dialog>
  373. <!-- 录入打样结果模态框 -->
  374. <el-dialog title="录入打样结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag"
  375. width="785px">
  376. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  377. style="margin-left: 0px;margin-top: 10px;">
  378. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  379. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd"
  380. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  381. </el-form-item>
  382. </el-form>
  383. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  384. style="margin-left:0px;margin-top: 5px;">
  385. <el-form-item label="打样结果信息" prop="proofingResultInformation"
  386. :rules="enterResultRules.proofingResultInformation">
  387. <el-input type="textarea" v-model="enterResultData.proofingResultInformation" :rows="3" resize='none'
  388. show-word-limit style="width: 500px;height: 30px"></el-input>
  389. </el-form-item>
  390. </el-form>
  391. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  392. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  393. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  394. </el-form>
  395. <el-table
  396. :height="200"
  397. :data="fileContentList"
  398. border
  399. v-loading="dataListLoading"
  400. style="width: 100%">
  401. <el-table-column
  402. v-for="(item,index) in fileColumnList" :key="index"
  403. :sortable="item.columnSortable"
  404. :prop="item.columnProp"
  405. :header-align="item.headerAlign"
  406. :show-overflow-tooltip="item.showOverflowTooltip"
  407. :align="item.align"
  408. :fixed="item.fixed===''?false:item.fixed"
  409. :min-width="item.columnWidth"
  410. :label="item.columnLabel">
  411. <template slot-scope="scope">
  412. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  413. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  414. </template>
  415. </el-table-column>
  416. <el-table-column
  417. fixed="right"
  418. header-align="center"
  419. align="center"
  420. width="100"
  421. label="操作">
  422. <template slot-scope="scope">
  423. <a @click="deleteFile(scope.row)">删除</a>
  424. </template>
  425. </el-table-column>
  426. </el-table>
  427. </el-form>
  428. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  429. <el-button type="primary" @click="saveProofingResult()">保存</el-button>
  430. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  431. </el-footer>
  432. </el-dialog>
  433. <!-- 录入送样信息模态框 -->
  434. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag"
  435. width="620px">
  436. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules"
  437. style="margin-left: 0px;margin-top: 10px;">
  438. <el-form-item label="实际送样日期" prop="actualitySendSamplesDate"
  439. :rules="submitResultRules.actualitySendSamplesDate">
  440. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd"
  441. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  442. </el-form-item>
  443. <el-form-item label="送样方式" prop="sendSamplesMethod" :rules="submitResultRules.sendSamplesMethod">
  444. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  445. <el-option label="客户自提" value="客户自提"></el-option>
  446. <el-option label="人员带货" value="人员带货"></el-option>
  447. <el-option label="其它" value="其它"></el-option>
  448. </el-select>
  449. </el-form-item>
  450. <el-form-item label="送货信息">
  451. <el-input v-model="submitResultData.deliverGoodsInformation" style="width: 221px"></el-input>
  452. </el-form-item>
  453. </el-form>
  454. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  455. <el-form-item label="送货备注">
  456. <el-input type="textarea" v-model="submitResultData.deliverGoodsRemark" :rows="3" resize='none'
  457. show-word-limit style="width: 456px;height: 30px"></el-input>
  458. </el-form-item>
  459. </el-form>
  460. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  461. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  462. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  463. </el-footer>
  464. </el-dialog>
  465. <!-- 客户回复模态框 -->
  466. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag"
  467. width="620px">
  468. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules"
  469. style="margin-left: 0px;margin-top: 10px;">
  470. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  471. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd"
  472. placeholder="请选择日期" style="width: 185px"></el-date-picker>
  473. </el-form-item>
  474. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  475. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  476. <el-option label="接受" value="接受"></el-option>
  477. <el-option label="不接受" value="不接受"></el-option>
  478. </el-select>
  479. </el-form-item>
  480. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  481. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  482. </el-form-item>
  483. </el-form>
  484. <el-form :inline="true" label-position="top" :model="customerResponseData"
  485. style="margin-left:0px;margin-top: 5px;">
  486. <el-form-item label="客户回复信息">
  487. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none'
  488. show-word-limit style="width: 595px;height: 30px"></el-input>
  489. </el-form-item>
  490. </el-form>
  491. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  492. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  493. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  494. </el-footer>
  495. </el-dialog>
  496. <!--选择项目模态框-->
  497. <el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList"
  498. :visible.sync="chooseProjectListFlag" width="35%" :close-on-click-modal="false">
  499. <el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
  500. <el-row :gutter="10">
  501. <el-col :span="6">
  502. <el-form-item label="项目号">
  503. <el-input v-model="searchProjectData.projectId"></el-input>
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="6">
  507. <el-form-item label="项目名称">
  508. <el-input v-model="searchProjectData.projectName"></el-input>
  509. </el-form-item>
  510. </el-col>
  511. <el-col :span="6">
  512. <el-form-item label=" ">
  513. <el-button type="primary" @click="searchProjectInfoList">查询</el-button>
  514. </el-form-item>
  515. </el-col>
  516. </el-row>
  517. <el-table :height="223"
  518. :data="projectList"
  519. border
  520. @row-click="projectClickRow">
  521. <el-table-column label="项目号" prop="projectId"/>
  522. <el-table-column label="项目名称" prop="projectName"/>
  523. </el-table>
  524. </el-form>
  525. </el-dialog>
  526. <!-- 页签 -->
  527. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 300px;" type="border-card" @tab-click="tabClick" class="customer-tab">
  528. <el-tab-pane label="基本信息" name="attribute">
  529. <proofing-attribute ref="dialogAttribute"
  530. :disabled="proofingCurrentRow.proofingStatus === '已完成'"
  531. :order-no="proofingCurrentRow.proofingNo"
  532. :approval-username="proofingCurrentRow.approvalUsername"
  533. :proofing-status="proofingCurrentRow.proofingStatus"
  534. :code-no="'Proofing'"
  535. :function-type="'order'">
  536. </proofing-attribute>
  537. </el-tab-pane>
  538. <!-- 项目信息页签 -->
  539. <el-tab-pane label="项目信息" name="project_information">
  540. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  541. <el-row :gutter="20">
  542. <el-col :span="8">
  543. <div class="grid-content bg-purple">
  544. <el-form-item label="项目号">
  545. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  546. </el-form-item>
  547. </div>
  548. </el-col>
  549. <el-col :span="8">
  550. <div class="grid-content bg-purple">
  551. <el-form-item label="项目名称">
  552. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  553. </el-form-item>
  554. </div>
  555. </el-col>
  556. <el-col :span="8">
  557. <div class="grid-content bg-purple">
  558. <el-form-item label="项目类型">
  559. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  560. </el-form-item>
  561. </div>
  562. </el-col>
  563. </el-row>
  564. <el-row :gutter="20">
  565. <el-col :span="8">
  566. <div class="grid-content bg-purple">
  567. <el-form-item label="客户来源">
  568. <el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
  569. </el-form-item>
  570. </div>
  571. </el-col>
  572. <el-col :span="8">
  573. <div class="grid-content bg-purple">
  574. <el-form-item label="优先级">
  575. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  576. </el-form-item>
  577. </div>
  578. </el-col>
  579. <el-col :span="8">
  580. <div class="grid-content bg-purple">
  581. <el-form-item label="终端客户">
  582. <el-input v-model="projectInformationData.finalCustomerName" readonly></el-input>
  583. </el-form-item>
  584. </div>
  585. </el-col>
  586. </el-row>
  587. <el-row :gutter="20">
  588. <el-col :span="8">
  589. <div class="grid-content bg-purple">
  590. <el-form-item label="项目经理">
  591. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  592. </el-form-item>
  593. </div>
  594. </el-col>
  595. <el-col :span="8">
  596. <div class="grid-content bg-purple">
  597. <el-form-item label="项目负责人">
  598. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  599. </el-form-item>
  600. </div>
  601. </el-col>
  602. <el-col :span="8">
  603. <div class="grid-content bg-purple">
  604. <el-form-item label="项目权限">
  605. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  606. </el-form-item>
  607. </div>
  608. </el-col>
  609. </el-row>
  610. <el-row :gutter="20">
  611. <el-col :span="6">
  612. <div class="grid-content bg-purple">
  613. <el-form-item label="创建时间">
  614. <el-input v-model="projectInformationData.createDate" readonly></el-input>
  615. </el-form-item>
  616. </div>
  617. </el-col>
  618. <el-col :span="6">
  619. <div class="grid-content bg-purple">
  620. <el-form-item label="创建人">
  621. <el-input v-model="projectInformationData.createBy" readonly></el-input>
  622. </el-form-item>
  623. </div>
  624. </el-col>
  625. <el-col :span="6">
  626. <div class="grid-content bg-purple">
  627. <el-form-item label="更新时间">
  628. <el-input v-model="projectInformationData.updateDate" readonly></el-input>
  629. </el-form-item>
  630. </div>
  631. </el-col>
  632. <el-col :span="6">
  633. <div class="grid-content bg-purple">
  634. <el-form-item label="更新人">
  635. <el-input v-model="projectInformationData.updateBy" readonly></el-input>
  636. </el-form-item>
  637. </div>
  638. </el-col>
  639. </el-row>
  640. <el-row :gutter="20">
  641. <el-col :span="24">
  642. <div class="grid-content bg-purple">
  643. <el-form-item label="项目描述">
  644. <el-input v-model="projectInformationData.projectDesc" readonly></el-input>
  645. </el-form-item>
  646. </div>
  647. </el-col>
  648. </el-row>
  649. <el-row :gutter="20">
  650. <el-col :span="24">
  651. <div class="grid-content bg-purple">
  652. <el-form-item label="其它特殊要求">
  653. <el-input v-model="projectInformationData.remark" readonly></el-input>
  654. </el-form-item>
  655. </div>
  656. </el-col>
  657. </el-row>
  658. </el-form>
  659. </el-tab-pane>
  660. <!-- 客户信息页签 -->
  661. <el-tab-pane label="客户信息" name="customer_information">
  662. <customer-info :project="proofingCurrentRow"></customer-info>
  663. </el-tab-pane>
  664. <el-tab-pane label="附件信息" name="proofing_file">
  665. <oss-components
  666. :save-visible="isAuth('103001:tab4:save')"
  667. :download-visible="isAuth('103001:tab4:download')"
  668. :remove-visible="isAuth('103001:tab4:remove')"
  669. :preview-visible="isAuth('103001:tab4:preview')"
  670. label="打样单号" style="margin-top: 5px" height="28vh" :columns="ossColumns"
  671. :order-ref2="proofingCurrentRow.proofingNo"
  672. :order-ref1="proofingCurrentRow.site" :disabled="proofingCurrentRow.proofingStatus === '已完成'"></oss-components>
  673. </el-tab-pane>
  674. <!-- 审批信息 -->
  675. <el-tab-pane label="审批信息" name="approvalInformation">
  676. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="320"></approval-information>
  677. </el-tab-pane>
  678. </el-tabs>
  679. <!-- chooseList模态框 -->
  680. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  681. <!-- 客户地址 -->
  682. <el-dialog title="联系地址清单" :close-on-click-modal="false" v-drag :visible.sync="addressModelFlag" width="520px">
  683. <el-table
  684. :height="300"
  685. :data="addressList"
  686. @row-dblclick="getAddressData"
  687. border
  688. style="width: 100%;">
  689. <el-table-column
  690. v-for="(item,index) in columnAddressList" :key="index"
  691. :sortable="item.columnSortable"
  692. :prop="item.columnProp"
  693. :header-align="item.headerAlign"
  694. :show-overflow-tooltip="item.showOverflowTooltip"
  695. :align="item.align"
  696. :fixed="item.fixed==''?false:item.fixed"
  697. :min-width="item.columnWidth"
  698. :label="item.columnLabel">
  699. <template slot-scope="scope">
  700. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  701. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  702. style="width: 100px; height: 80px"/></span>
  703. </template>
  704. </el-table-column>
  705. </el-table>
  706. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  707. <el-button type="primary" @click="addressModelFlag=false">关闭</el-button>
  708. </el-footer>
  709. </el-dialog>
  710. <!-- 联系人 -->
  711. <el-dialog title="收货人清单" :close-on-click-modal="false" v-drag :visible.sync="contactModelFlag" width="520px">
  712. <el-table
  713. :height="300"
  714. :data="contactList"
  715. @row-dblclick="getContactData"
  716. border
  717. style="width: 100%;">
  718. <el-table-column
  719. v-for="(item,index) in columnContactList" :key="index"
  720. :sortable="item.columnSortable"
  721. :prop="item.columnProp"
  722. :header-align="item.headerAlign"
  723. :show-overflow-tooltip="item.showOverflowTooltip"
  724. :align="item.align"
  725. :fixed="item.fixed==''?false:item.fixed"
  726. :min-width="item.columnWidth"
  727. :label="item.columnLabel">
  728. <template slot-scope="scope">
  729. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  730. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  731. style="width: 100px; height: 80px"/></span>
  732. </template>
  733. </el-table-column>
  734. </el-table>
  735. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  736. <el-button type="primary" @click="contactModelFlag=false">关闭</el-button>
  737. </el-footer>
  738. </el-dialog>
  739. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag
  740. :visible.sync="delegateAccessVisible" width="40vw">
  741. <el-form :inline="true" label-position="top" :model="proofingDelegateAccess">
  742. <el-form-item label="编码">
  743. <el-input v-model="proofingDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  744. </el-form-item>
  745. <el-form-item label="名称">
  746. <el-input v-model="proofingDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  747. </el-form-item>
  748. <el-form-item label=" ">
  749. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  750. </el-form-item>
  751. </el-form>
  752. <el-table v-if="delegateAccessVisible"
  753. :height="300"
  754. :data="baseDelegateAccessList"
  755. @selection-change="handleSelectionChange"
  756. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  757. ref="delegateAccesstTable"
  758. border row-key="delegateAccess"
  759. style="width: 100%;">
  760. <el-table-column
  761. type="selection"
  762. header-align="center"
  763. align="center"
  764. :reserve-selection="true"
  765. width="50">
  766. </el-table-column>
  767. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  768. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  769. </el-table>
  770. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  771. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  772. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  773. </el-footer>
  774. </el-dialog>
  775. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="rejectVisible" width="500px">
  776. <el-form label-position="top">
  777. <el-form-item label="驳回意见" class="auto">
  778. <el-input type="textarea" v-model="rejectOpinion" :rows="3"></el-input>
  779. </el-form-item>
  780. </el-form>
  781. <el-footer style="text-align:center;height: 30px;line-height: 30px;">
  782. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  783. <el-button type="primary" @click="rejectVisible = false">取消</el-button>
  784. </el-footer>
  785. </el-dialog>
  786. <!-- 上传文件的modal -->
  787. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  788. <filter-search :visible.sync="filterVisible" @search="searchByAnyField"></filter-search>
  789. </div>
  790. </template>
  791. <script>
  792. import {
  793. proofingInformationSearch, // 打样信息列表查询
  794. proofingInformationSave, // 打样信息新增
  795. proofingInformationEdit, // 打样信息编辑
  796. proofingInformationDelete, // 打样信息删除
  797. getFileContentList, // 获取打样单附件列表
  798. proofingResultSearch, // 获取打样结果对象
  799. deleteProofingFile, // 文件删除
  800. saveProofingResult, // 保存打样结果
  801. saveSubmitResult, // 保存送样结果
  802. saveCustomerResponse, // 保存客户回复
  803. getProjectPartList, // 获取产品列表
  804. getProjectInformation, // 获取项目信息
  805. getCustomerInformation, // 获取客户信息
  806. } from '@/api/proofing/proofingInformation.js'
  807. import {
  808. downLoadQuotationFile, // 文件下载
  809. searchProjectInfoList,
  810. } from '@/api/quotation/quotationInformation.js'
  811. import {
  812. customerAddressSearch, // 客户联系地址列表查询
  813. } from '@/api/customer/customerAddress.js'
  814. import {
  815. customerContactSearch, // 客户联系人列表查询
  816. } from '@/api/customer/customerContact.js'
  817. import Chooselist from '@/views/modules/common/Chooselist'
  818. import proofingUploadFile from "./proofing_upload_file"
  819. import DictDataSelect from "../sys/dict-data-select.vue";
  820. import {
  821. proofingInformationEditStatus, proofingInformationSearchAny, queryBuList,
  822. searchDelegateAccess,
  823. searchDelegateAccessByUser, submitChange
  824. } from "../../../api/proofing/proofingInformation";
  825. import {getNodeAuthority, getApprovalList, checkSuperAdmin} from "../../../api/changeManagement/changeManagement";
  826. import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
  827. import profingFile from "./profingFile"
  828. import proofingAttribute from "../demoComponents/orderProperties"
  829. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  830. import {queryCustomer} from "../../../api/customer/customerInformation";
  831. import {queryProjectByCustomer} from "../../../api/project/project";
  832. import OssComponents from "../oss/ossComponents.vue";
  833. import BuSelect from "../base/BuSelect.vue";
  834. import CustomerInfo from "../quotation/sellForQuotation/customerInfo.vue";
  835. import FilterSearch from "../../common/filterSearch.vue";
  836. import {testInformationSearchAny} from "../../../api/test/testInformation";
  837. export default {
  838. components: {
  839. FilterSearch,
  840. CustomerInfo,
  841. BuSelect,
  842. OssComponents,
  843. ApprovalInformation,
  844. ProjectInfo
  845. , DictDataSelect
  846. , Chooselist
  847. , proofingUploadFile
  848. , profingFile
  849. , proofingAttribute
  850. },
  851. watch: {
  852. searchData: {
  853. deep: true,
  854. handler: function (newV, oldV) {
  855. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  856. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  857. }
  858. },
  859. 'modalData.proofingNo'(newV, oldV) {
  860. if (newV) {
  861. this.modalData.proofingNo = newV.toUpperCase()
  862. }
  863. },
  864. 'modalData.customerNo'(newV, oldV) {
  865. if (newV) {
  866. this.modalData.customerNo = newV.toUpperCase()
  867. }
  868. if (oldV) {
  869. if (!newV) {
  870. this.modalData.customerDesc = ''
  871. }
  872. this.modalData.projectId = ''
  873. this.modalData.consignee = ''
  874. this.modalData.consigneeContact = ''
  875. this.modalData.sendSamplesAddress = ''
  876. }
  877. },
  878. 'modalData.projectId'(newV, oldV) {
  879. if (newV) {
  880. this.modalData.projectId = newV.toUpperCase()
  881. }
  882. if (oldV) {
  883. if (!newV) {
  884. this.modalData.projectName = ''
  885. }
  886. this.modalData.testPartNo = ''
  887. this.modalData.partName = ''
  888. this.projectPartListSelections = [];
  889. this.projectPartList = [];
  890. this.$refs.projectPartTable.clearSelection();
  891. }
  892. },
  893. rejectVisible(newVal, oldVal) {
  894. if (newVal === false) {
  895. this.rejectOpinion = ''
  896. }
  897. },
  898. "searchData.proofingNo"(newVal, oldVal) {
  899. this.searchData.proofingNo = newVal.toUpperCase()
  900. },
  901. 'modalFlag'(newVal, oldVal){
  902. if (newVal === false){
  903. this.detailVisible = false
  904. this.projectPartData.finalPartNo = ''
  905. this.projectPartData.customerPartNo = ''
  906. this.no = 1
  907. this.size = 20
  908. this.total = 0
  909. this.projectPartList = []
  910. this.projectPartListSelections = []
  911. }
  912. },
  913. 'modalData.tracker'(newVal,oldVal){
  914. if (!newVal){
  915. this.modalData.trackerName = ''
  916. }
  917. },
  918. 'modalData.engineer'(newVal,oldVal){
  919. if (!newVal){
  920. this.modalData.engineerName = ''
  921. }
  922. },
  923. 'modalData.approver'(newVal,oldVal){
  924. if (!newVal){
  925. this.modalData.approverName = ''
  926. }
  927. },
  928. },
  929. computed: {
  930. delegateAccessName: {
  931. get() {
  932. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  933. },
  934. set(val) {
  935. }
  936. },
  937. columnFlagByHeader() {
  938. return (value) => {
  939. if (this.modalData.flag === '1') {
  940. return false
  941. }
  942. if (!this.columnFieldList1) {
  943. return true
  944. }
  945. let arr = this.columnFieldList1.filter(a => a.fieldId === value)
  946. if (arr.length > 0) {
  947. return arr[0].updateFlag === 'N'
  948. }
  949. return true
  950. }
  951. },
  952. columnFlagByDelegateAccess() {
  953. return (value) => {
  954. if (this.modalData.flag === '1') {
  955. return false
  956. }
  957. if (!this.columnFieldList2) {
  958. return true
  959. }
  960. let arr = this.columnFieldList2.filter(a => a.fieldId === value)
  961. if (arr.length > 0) {
  962. return arr[0].updateFlag === 'N'
  963. }
  964. return true
  965. }
  966. },
  967. },
  968. data() {
  969. return {
  970. approvalList: [],
  971. selectionDelegateAccess: [],
  972. selectionDelegateAccess2: [],
  973. delegateAccessVisible: false,
  974. baseDelegateAccessList: [],
  975. proofingDelegateAccess: {
  976. delegateAccess: '',
  977. delegateAccessName: '',
  978. },
  979. activeName: 'part',
  980. // 导出
  981. exportData: [],
  982. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  983. exportHeader: ['设备分类'],
  984. exportFooter: [],
  985. resultList: [],
  986. // ======== 行高 ========
  987. height: 300,
  988. secondHeight: 200,
  989. // ======== 分页 ========
  990. pageIndex: 1,
  991. pageSize: 50,
  992. totalPage: 0,
  993. selectedDataNum: 0,
  994. // 条件查询
  995. searchData: {
  996. site: this.$store.state.user.site,
  997. customerNo: '',
  998. customerDesc: '',
  999. trackerName: '',
  1000. testPartNo: '',
  1001. partName: '',
  1002. proofingStatus: '',
  1003. proofingResultStatus: '',
  1004. startDate: '',
  1005. endDate: '',
  1006. projectId: '',
  1007. projectName: '',
  1008. engineerName: '',
  1009. approverName: '',
  1010. priorityLevel: '',
  1011. proofingNo: '',
  1012. customerPartNo: '',
  1013. finalPartNo: '',
  1014. page: 1,
  1015. limit: 10,
  1016. menuId: this.$route.meta.menuId,
  1017. buNo: '',
  1018. },
  1019. // 其它
  1020. dataListLoading: false,
  1021. // 初始页签
  1022. activeTable: 'attribute',
  1023. // ======== 数据对象 ========
  1024. modalData: {
  1025. flag: '1',
  1026. title: '打样新增',
  1027. site: this.$store.state.user.site,
  1028. proofingNo: '',
  1029. customerNo: '',
  1030. customerDesc: '',
  1031. projectId: '',
  1032. projectName: '',
  1033. tracker: '',
  1034. trackerName: '',
  1035. testPartNo: '',
  1036. partName: '',
  1037. engineer: '',
  1038. engineerName: '',
  1039. approver: '',
  1040. approverName: '',
  1041. priorityLevel: '',
  1042. proofingNumber: 1,
  1043. requiredDeliveryDate: '',
  1044. remark: '',
  1045. technicalConsiderations: '',
  1046. isNeedToSendSamples: '',
  1047. sendSamplesAddress: '',
  1048. consignee: '',
  1049. consigneeContact: '',
  1050. actualityDeliveryDate: '',
  1051. proofingResultInformation: '',
  1052. actualitySendSamplesDate: '',
  1053. sendSamplesMethod: '',
  1054. deliverGoodsInformation: '',
  1055. deliverGoodsRemark: '',
  1056. actualityReplyDate: '',
  1057. confirmResults: '',
  1058. confirmBy: '',
  1059. confirmInformation: '',
  1060. proofingStatus: '草稿',
  1061. proofingResultStatus: 'B',
  1062. nextToDo: '',
  1063. createDate: '',
  1064. createBy: '',
  1065. updateDate: '',
  1066. updateBy: '',
  1067. nodeConclusion: '',
  1068. stepId: '',
  1069. rejectFlag: '',
  1070. rejectStepId: '',
  1071. isReject: '',
  1072. nodeId: '',
  1073. proofingAmount: undefined,
  1074. },
  1075. proofingDetailData: {
  1076. technicalConsiderations: '',
  1077. isNeedToSendSamples: '',
  1078. sendSamplesAddress: '',
  1079. consignee: '',
  1080. consigneeContact: ''
  1081. },
  1082. proofingResultData: {
  1083. proofingResultStatus: '',
  1084. actualityDeliveryDate: '',
  1085. isNeedToSendSamples: '',
  1086. proofingResultInformation: '',
  1087. actualitySendSamplesDate: '',
  1088. sendSamplesMethod: '',
  1089. deliverGoodsInformation: '',
  1090. deliverGoodsRemark: '',
  1091. confirmResults: '',
  1092. actualityReplyDate: '',
  1093. confirmBy: '',
  1094. confirmInformation: ''
  1095. },
  1096. enterResultData: {
  1097. site: this.$store.state.user.site,
  1098. proofingNo: '',
  1099. actualityDeliveryDate: '',
  1100. proofingResultInformation: '',
  1101. updateBy: this.$store.state.user.name,
  1102. proofingResultStatus: '',
  1103. fileContentList: []
  1104. },
  1105. submitResultData: {
  1106. site: this.$store.state.user.site,
  1107. proofingNo: '',
  1108. actualitySendSamplesDate: '',
  1109. sendSamplesMethod: '',
  1110. deliverGoodsInformation: '',
  1111. deliverGoodsRemark: '',
  1112. updateBy: this.$store.state.user.name,
  1113. proofingResultStatus: ''
  1114. },
  1115. customerResponseData: {
  1116. site: this.$store.state.user.site,
  1117. proofingNo: '',
  1118. actualityReplyDate: '',
  1119. confirmResults: '',
  1120. confirmBy: '',
  1121. confirmInformation: '',
  1122. updateBy: this.$store.state.user.name,
  1123. proofingResultStatus: ''
  1124. },
  1125. projectPartData: {
  1126. site: this.$store.state.user.site,
  1127. testPartNo: '',
  1128. finalPartNo: '',
  1129. customerPartNo: '',
  1130. partName: ''
  1131. },
  1132. projectInformationData: {
  1133. projectId: '',
  1134. projectName: '',
  1135. projectType: '',
  1136. projectSourceDesc: '',
  1137. priorityDesc: '',
  1138. status: '',
  1139. projectDesc: '',
  1140. projectManagerName: '',
  1141. projectOwnerName: '',
  1142. userRoleName: '',
  1143. remark: ''
  1144. },
  1145. customerInformationData: {
  1146. customerNo: '',
  1147. customerDesc: '',
  1148. importantCustomer: '',
  1149. customerCurrency: '',
  1150. turnoverOfYear: '',
  1151. potentialRevenueOfYear: '',
  1152. customerStatus: '',
  1153. customerIndustry: '',
  1154. companyName: '',
  1155. jobDescription: '',
  1156. customerDescription: '',
  1157. contactName: '',
  1158. contactPhoneNumber1: '',
  1159. position: '',
  1160. addressName: '',
  1161. addressType: '',
  1162. createDate: '',
  1163. createBy: '',
  1164. updateDate: '',
  1165. updateBy: ''
  1166. },
  1167. // ======== 数据列表 ========
  1168. dataList: [],
  1169. fileContentList: [],
  1170. projectPartList: [],
  1171. addressList: [],
  1172. contactList: [],
  1173. // ======== 列表表头 ========
  1174. columnList: [
  1175. {
  1176. userId: this.$store.state.user.name,
  1177. functionId: 103001,
  1178. serialNumber: '103001Table1BuDesc',
  1179. tableId: '103001Table1',
  1180. tableName: '打样信息表',
  1181. columnProp: 'buDesc',
  1182. headerAlign: 'center',
  1183. align: 'center',
  1184. columnLabel: 'BU',
  1185. columnHidden: false,
  1186. columnImage: false,
  1187. columnSortable: false,
  1188. sortLv: 0,
  1189. status: true,
  1190. fixed: '',
  1191. columnWidth: 80
  1192. },
  1193. {
  1194. userId: this.$store.state.user.name,
  1195. functionId: 103001,
  1196. serialNumber: '103001Table1ProofingNo',
  1197. tableId: '103001Table1',
  1198. tableName: '打样信息表',
  1199. columnProp: 'proofingNo',
  1200. headerAlign: 'center',
  1201. align: 'center',
  1202. columnLabel: '打样单号',
  1203. columnHidden: false,
  1204. columnImage: false,
  1205. columnSortable: false,
  1206. sortLv: 0,
  1207. status: true,
  1208. fixed: '',
  1209. columnWidth: 120
  1210. },
  1211. {
  1212. userId: this.$store.state.user.name,
  1213. functionId: 103001,
  1214. serialNumber: '103001Table1CustomerNo',
  1215. tableId: '103001Table1',
  1216. tableName: '打样信息表',
  1217. columnProp: 'customerNo',
  1218. headerAlign: 'center',
  1219. align: 'center',
  1220. columnLabel: '客户编码',
  1221. columnHidden: false,
  1222. columnImage: false,
  1223. columnSortable: false,
  1224. sortLv: 0,
  1225. status: true,
  1226. fixed: '',
  1227. columnWidth: 100
  1228. },
  1229. {
  1230. userId: this.$store.state.user.name,
  1231. functionId: 103001,
  1232. serialNumber: '103001Table1CustomerDesc',
  1233. tableId: '103001Table1',
  1234. tableName: '打样信息表',
  1235. columnProp: 'customerDesc',
  1236. headerAlign: 'center',
  1237. align: 'left',
  1238. columnLabel: '客户名称',
  1239. columnHidden: false,
  1240. columnImage: false,
  1241. columnSortable: false,
  1242. sortLv: 0,
  1243. status: true,
  1244. fixed: '',
  1245. columnWidth: 120
  1246. },
  1247. {
  1248. userId: this.$store.state.user.name,
  1249. functionId: 103001,
  1250. serialNumber: '103001Table1ProjectId',
  1251. tableId: '103001Table1',
  1252. tableName: '打样信息表',
  1253. columnProp: 'projectId',
  1254. headerAlign: 'center',
  1255. align: 'center',
  1256. columnLabel: '项目号',
  1257. columnHidden: false,
  1258. columnImage: false,
  1259. columnSortable: false,
  1260. sortLv: 0,
  1261. status: true,
  1262. fixed: '',
  1263. columnWidth: 110
  1264. },
  1265. {
  1266. userId: this.$store.state.user.name,
  1267. functionId: 103001,
  1268. serialNumber: '103001Table1ProjectName',
  1269. tableId: '103001Table1',
  1270. tableName: '打样信息表',
  1271. columnProp: 'projectName',
  1272. headerAlign: 'center',
  1273. align: 'left',
  1274. columnLabel: '项目名称',
  1275. columnHidden: false,
  1276. columnImage: false,
  1277. columnSortable: false,
  1278. sortLv: 0,
  1279. status: true,
  1280. fixed: '',
  1281. columnWidth: 120
  1282. },
  1283. {
  1284. userId: this.$store.state.user.name,
  1285. functionId: 103001,
  1286. serialNumber: '103001Table1TestPartNo',
  1287. tableId: '103001Table1',
  1288. tableName: '打样信息表',
  1289. columnProp: 'testPartNo',
  1290. headerAlign: 'center',
  1291. align: 'left',
  1292. columnLabel: 'PLM物料编码',
  1293. columnHidden: false,
  1294. columnImage: false,
  1295. columnSortable: false,
  1296. sortLv: 0,
  1297. status: true,
  1298. fixed: '',
  1299. columnWidth: 150
  1300. },
  1301. {
  1302. userId: this.$store.state.user.name,
  1303. functionId: 103001,
  1304. serialNumber: '103001Table1FinalPartNo',
  1305. tableId: '103001Table1',
  1306. tableName: '打样信息表',
  1307. columnProp: 'finalPartNo',
  1308. headerAlign: 'center',
  1309. align: 'left',
  1310. columnLabel: 'IFS物料编码',
  1311. columnHidden: false,
  1312. columnImage: false,
  1313. columnSortable: false,
  1314. sortLv: 0,
  1315. status: true,
  1316. fixed: '',
  1317. columnWidth: 140
  1318. },
  1319. {
  1320. userId: this.$store.state.user.name,
  1321. functionId: 103001,
  1322. serialNumber: '103001Table1PartName',
  1323. tableId: '103001Table1',
  1324. tableName: '打样信息表',
  1325. columnProp: 'partName',
  1326. headerAlign: 'center',
  1327. align: 'left',
  1328. columnLabel: '物料名称',
  1329. columnHidden: false,
  1330. columnImage: false,
  1331. columnSortable: false,
  1332. sortLv: 0,
  1333. status: true,
  1334. fixed: '',
  1335. columnWidth: 180
  1336. },
  1337. {
  1338. userId: this.$store.state.user.name,
  1339. functionId: 103001,
  1340. serialNumber: '103001Table1PartName',
  1341. tableId: '103001Table1',
  1342. tableName: '打样信息表',
  1343. columnProp: 'oriCodeNo',
  1344. headerAlign: 'center',
  1345. align: 'left',
  1346. columnLabel: '参数卡编码',
  1347. columnHidden: false,
  1348. columnImage: false,
  1349. columnSortable: false,
  1350. sortLv: 0,
  1351. status: true,
  1352. fixed: '',
  1353. columnWidth: 180
  1354. },
  1355. {
  1356. userId: this.$store.state.user.name,
  1357. functionId: 103001,
  1358. serialNumber: '103001Table1PartName',
  1359. tableId: '103001Table1',
  1360. tableName: '打样信息表',
  1361. columnProp: 'stage',
  1362. headerAlign: 'center',
  1363. align: 'left',
  1364. columnLabel: 'Production Stage',
  1365. columnHidden: false,
  1366. columnImage: false,
  1367. columnSortable: false,
  1368. sortLv: 0,
  1369. status: true,
  1370. fixed: '',
  1371. columnWidth: 180
  1372. },
  1373. {
  1374. userId: this.$store.state.user.name,
  1375. functionId: 103001,
  1376. serialNumber: '103001Table1CustomerPartNo',
  1377. tableId: '103001Table1',
  1378. tableName: '打样信息表',
  1379. columnProp: 'customerPartNo',
  1380. headerAlign: 'center',
  1381. align: 'left',
  1382. columnLabel: '客户物料编码',
  1383. columnHidden: false,
  1384. columnImage: false,
  1385. columnSortable: false,
  1386. sortLv: 0,
  1387. status: true,
  1388. fixed: '',
  1389. columnWidth: 100
  1390. },
  1391. {
  1392. userId: this.$store.state.user.name,
  1393. functionId: 103001,
  1394. serialNumber: '103001Table1TrackerName',
  1395. tableId: '103001Table1',
  1396. tableName: '打样信息表',
  1397. columnProp: 'trackerName',
  1398. headerAlign: 'center',
  1399. align: 'center',
  1400. columnLabel: 'CS',
  1401. columnHidden: false,
  1402. columnImage: false,
  1403. columnSortable: false,
  1404. sortLv: 0,
  1405. status: true,
  1406. fixed: '',
  1407. columnWidth: 80
  1408. },
  1409. {
  1410. userId: this.$store.state.user.name,
  1411. functionId: 103001,
  1412. serialNumber: '103001Table1EngineerName',
  1413. tableId: '103001Table1',
  1414. tableName: '打样信息表',
  1415. columnProp: 'engineerName',
  1416. headerAlign: 'center',
  1417. align: 'center',
  1418. columnLabel: 'NPI工程师',
  1419. columnHidden: false,
  1420. columnImage: false,
  1421. columnSortable: false,
  1422. sortLv: 0,
  1423. status: true,
  1424. fixed: '',
  1425. columnWidth: 80
  1426. },
  1427. {
  1428. userId: this.$store.state.user.name,
  1429. functionId: 103001,
  1430. serialNumber: '103001Table1EngineerName',
  1431. tableId: '103001Table1',
  1432. tableName: '打样信息表',
  1433. columnProp: 'approverName',
  1434. headerAlign: 'center',
  1435. align: 'center',
  1436. columnLabel: 'Approver',
  1437. columnHidden: false,
  1438. columnImage: false,
  1439. columnSortable: false,
  1440. sortLv: 0,
  1441. status: true,
  1442. fixed: '',
  1443. columnWidth: 80
  1444. },
  1445. {
  1446. userId: this.$store.state.user.name,
  1447. functionId: 103001,
  1448. serialNumber: '103001Table1PriorityLevel',
  1449. tableId: '103001Table1',
  1450. tableName: '打样信息表',
  1451. columnProp: 'priorityLevel',
  1452. headerAlign: 'center',
  1453. align: 'center',
  1454. columnLabel: '优先等级',
  1455. columnHidden: false,
  1456. columnImage: false,
  1457. columnSortable: false,
  1458. sortLv: 0,
  1459. status: true,
  1460. fixed: '',
  1461. columnWidth: 80
  1462. },
  1463. {
  1464. userId: this.$store.state.user.name,
  1465. functionId: 103001,
  1466. serialNumber: '103001Table1ProofingNumber',
  1467. tableId: '103001Table1',
  1468. tableName: '打样信息表',
  1469. columnProp: 'proofingNumber',
  1470. headerAlign: 'center',
  1471. align: 'right',
  1472. columnLabel: '打样数量',
  1473. columnHidden: false,
  1474. columnImage: false,
  1475. columnSortable: false,
  1476. sortLv: 0,
  1477. status: true,
  1478. fixed: '',
  1479. columnWidth: 80
  1480. },
  1481. {
  1482. userId: this.$store.state.user.name,
  1483. functionId: 103001,
  1484. serialNumber: '103001Table1RequiredDeliveryDate',
  1485. tableId: '103001Table1',
  1486. tableName: '打样信息表',
  1487. columnProp: 'requiredDeliveryDate',
  1488. headerAlign: 'center',
  1489. align: 'center',
  1490. columnLabel: '要求交付日期',
  1491. columnHidden: false,
  1492. columnImage: false,
  1493. columnSortable: false,
  1494. sortLv: 0,
  1495. status: true,
  1496. fixed: '',
  1497. columnWidth: 160
  1498. },
  1499. {
  1500. userId: this.$store.state.user.name,
  1501. functionId: 103001,
  1502. serialNumber: '103001Table1ProofingStatus',
  1503. tableId: '103001Table1',
  1504. tableName: '打样信息表',
  1505. columnProp: 'proofingStatus',
  1506. headerAlign: 'center',
  1507. align: 'left',
  1508. columnLabel: '状态',
  1509. columnHidden: false,
  1510. columnImage: false,
  1511. columnSortable: false,
  1512. sortLv: 0,
  1513. status: true,
  1514. fixed: '',
  1515. columnWidth: 80
  1516. },
  1517. {
  1518. userId: this.$store.state.user.name,
  1519. functionId: 103001,
  1520. serialNumber: '103001Table1NodeName',
  1521. tableId: '103001Table1',
  1522. tableName: '打样信息表',
  1523. columnProp: 'nodeName',
  1524. headerAlign: 'center',
  1525. align: 'left',
  1526. columnLabel: '当前节点',
  1527. columnHidden: false,
  1528. columnImage: false,
  1529. columnSortable: false,
  1530. sortLv: 0,
  1531. status: true,
  1532. fixed: '',
  1533. columnWidth: 150
  1534. },
  1535. {
  1536. userId: this.$store.state.user.name,
  1537. functionId: 103001,
  1538. serialNumber: '103001Table1ApprovalUsername',
  1539. tableId: '103001Table1',
  1540. tableName: '打样信息表',
  1541. columnProp: 'approvalUsername',
  1542. headerAlign: 'center',
  1543. align: 'left',
  1544. columnLabel: '当前节点审批人',
  1545. columnHidden: false,
  1546. columnImage: false,
  1547. columnSortable: false,
  1548. sortLv: 0,
  1549. status: true,
  1550. fixed: '',
  1551. columnWidth: 150
  1552. },
  1553. {
  1554. userId: this.$store.state.user.name,
  1555. functionId: 103001,
  1556. serialNumber: '103001Table1CreateDate',
  1557. tableId: '103001Table1',
  1558. tableName: '打样信息表',
  1559. columnProp: 'createDate',
  1560. headerAlign: 'center',
  1561. align: 'center',
  1562. columnLabel: '创建时间',
  1563. columnHidden: false,
  1564. columnImage: false,
  1565. columnSortable: false,
  1566. sortLv: 0,
  1567. status: true,
  1568. fixed: '',
  1569. columnWidth: 160
  1570. },
  1571. {
  1572. userId: this.$store.state.user.name,
  1573. functionId: 103001,
  1574. serialNumber: '103001Table1CreateBy',
  1575. tableId: '103001Table1',
  1576. tableName: '打样信息表',
  1577. columnProp: 'createBy',
  1578. headerAlign: 'center',
  1579. align: 'center',
  1580. columnLabel: '创建人',
  1581. columnHidden: false,
  1582. columnImage: false,
  1583. columnSortable: false,
  1584. sortLv: 0,
  1585. status: true,
  1586. fixed: '',
  1587. columnWidth: 80
  1588. },
  1589. {
  1590. userId: this.$store.state.user.name,
  1591. functionId: 103001,
  1592. serialNumber: '103001Table1UpdateDate',
  1593. tableId: '103001Table1',
  1594. tableName: '打样信息表',
  1595. columnProp: 'updateDate',
  1596. headerAlign: 'center',
  1597. align: 'center',
  1598. columnLabel: '更新时间',
  1599. columnHidden: false,
  1600. columnImage: false,
  1601. columnSortable: false,
  1602. sortLv: 0,
  1603. status: true,
  1604. fixed: '',
  1605. columnWidth: 160
  1606. },
  1607. {
  1608. userId: this.$store.state.user.name,
  1609. functionId: 103001,
  1610. serialNumber: '103001Table1UpdateBy',
  1611. tableId: '103001Table1',
  1612. tableName: '打样信息表',
  1613. columnProp: 'updateBy',
  1614. headerAlign: 'center',
  1615. align: 'center',
  1616. columnLabel: '更新人',
  1617. columnHidden: false,
  1618. columnImage: false,
  1619. columnSortable: false,
  1620. sortLv: 0,
  1621. status: true,
  1622. fixed: '',
  1623. columnWidth: 80
  1624. }
  1625. ],
  1626. fileColumnList: [
  1627. {
  1628. userId: this.$store.state.user.name,
  1629. functionId: 103001,
  1630. serialNumber: '103001Table2FileName',
  1631. tableId: '103001Table2',
  1632. tableName: '文件信息表',
  1633. columnProp: 'fileName',
  1634. headerAlign: 'center',
  1635. align: 'center',
  1636. columnLabel: '文件名称',
  1637. columnHidden: false,
  1638. columnImage: false,
  1639. columnSortable: false,
  1640. sortLv: 0,
  1641. status: true,
  1642. fixed: '',
  1643. columnWidth: 140
  1644. },
  1645. {
  1646. userId: this.$store.state.user.name,
  1647. functionId: 103001,
  1648. serialNumber: '103001Table2FileRemark',
  1649. tableId: '103001Table2',
  1650. tableName: '文件信息表',
  1651. columnProp: 'fileRemark',
  1652. headerAlign: 'center',
  1653. align: 'center',
  1654. columnLabel: '备注',
  1655. columnHidden: false,
  1656. columnImage: false,
  1657. columnSortable: false,
  1658. sortLv: 0,
  1659. status: true,
  1660. fixed: '',
  1661. columnWidth: 240
  1662. },
  1663. // {
  1664. // userId: this.$store.state.user.name,
  1665. // functionId: 103001,
  1666. // serialNumber: '103001Table2OrderRef3',
  1667. // tableId: '103001Table2',
  1668. // tableName: '文件信息表',
  1669. // columnProp: 'orderRef3',
  1670. // headerAlign: 'center',
  1671. // align: 'center',
  1672. // columnLabel: '文件描述',
  1673. // columnHidden: false,
  1674. // columnImage: false,
  1675. // columnSortable: false,
  1676. // sortLv: 0,
  1677. // status: true,
  1678. // fixed: '',
  1679. // columnWidth: 120
  1680. // },
  1681. {
  1682. userId: this.$store.state.user.name,
  1683. functionId: 103001,
  1684. serialNumber: '103001Table2CreateDate',
  1685. tableId: '103001Table2',
  1686. tableName: '文件信息表',
  1687. columnProp: 'createDate',
  1688. headerAlign: 'center',
  1689. align: 'center',
  1690. columnLabel: '上传时间',
  1691. columnHidden: false,
  1692. columnImage: false,
  1693. columnSortable: false,
  1694. sortLv: 0,
  1695. status: true,
  1696. fixed: '',
  1697. columnWidth: 140
  1698. },
  1699. {
  1700. userId: this.$store.state.user.name,
  1701. functionId: 103001,
  1702. serialNumber: '103001Table2CreatedBy',
  1703. tableId: '103001Table2',
  1704. tableName: '文件信息表',
  1705. columnProp: 'createdBy',
  1706. headerAlign: 'center',
  1707. align: 'center',
  1708. columnLabel: '上传人',
  1709. columnHidden: false,
  1710. columnImage: false,
  1711. columnSortable: false,
  1712. sortLv: 0,
  1713. status: true,
  1714. fixed: '',
  1715. columnWidth: 140
  1716. }
  1717. ],
  1718. projectPartDetailList: [
  1719. {
  1720. userId: this.$store.state.user.name,
  1721. functionId: 102001,
  1722. serialNumber: '103001Table4TestPartNo',
  1723. tableId: '103001Table4',
  1724. tableName: '项目物料表',
  1725. columnProp: 'testPartNo',
  1726. headerAlign: 'center',
  1727. align: 'left',
  1728. columnLabel: 'PLM物料编码',
  1729. columnHidden: false,
  1730. columnImage: false,
  1731. columnSortable: false,
  1732. sortLv: 0,
  1733. status: true,
  1734. fixed: '',
  1735. columnWidth: 150
  1736. },
  1737. {
  1738. userId: this.$store.state.user.name,
  1739. functionId: 102001,
  1740. serialNumber: '103001Table4FinalPartNo',
  1741. tableId: '103001Table4',
  1742. tableName: '项目物料表',
  1743. columnProp: 'finalPartNo',
  1744. headerAlign: 'center',
  1745. align: 'left',
  1746. columnLabel: 'IFS物料编码',
  1747. columnHidden: false,
  1748. columnImage: false,
  1749. columnSortable: false,
  1750. sortLv: 0,
  1751. status: true,
  1752. fixed: '',
  1753. columnWidth: 120
  1754. },
  1755. {
  1756. userId: this.$store.state.user.name,
  1757. functionId: 102001,
  1758. serialNumber: '103001Table4PartDesc',
  1759. tableId: '103001Table4',
  1760. tableName: '项目物料表',
  1761. columnProp: 'partDesc',
  1762. headerAlign: 'center',
  1763. align: 'left',
  1764. columnLabel: '物料名称',
  1765. columnHidden: false,
  1766. columnImage: false,
  1767. columnSortable: false,
  1768. sortLv: 0,
  1769. status: true,
  1770. fixed: '',
  1771. columnWidth: 120
  1772. },
  1773. {
  1774. userId: this.$store.state.user.name,
  1775. functionId: 102001,
  1776. serialNumber: '103001Table4CustomerPartNo',
  1777. tableId: '103001Table4',
  1778. tableName: '项目物料表',
  1779. columnProp: 'customerPartNo',
  1780. headerAlign: 'center',
  1781. align: 'left',
  1782. columnLabel: '客户料号',
  1783. columnHidden: false,
  1784. columnImage: false,
  1785. columnSortable: false,
  1786. sortLv: 0,
  1787. status: true,
  1788. fixed: '',
  1789. columnWidth: 120
  1790. },
  1791. {
  1792. userId: this.$store.state.user.name,
  1793. functionId: 102001,
  1794. serialNumber: '103001Table4PartSpec',
  1795. tableId: '103001Table4',
  1796. tableName: '项目物料表',
  1797. columnProp: 'partSpec',
  1798. headerAlign: 'center',
  1799. align: 'center',
  1800. columnLabel: '产品规格',
  1801. columnHidden: false,
  1802. columnImage: false,
  1803. columnSortable: false,
  1804. sortLv: 0,
  1805. status: true,
  1806. fixed: '',
  1807. columnWidth: 120
  1808. }, {
  1809. userId: this.$store.state.user.name,
  1810. functionId: 102001,
  1811. serialNumber: '103001Table4PartTypeDesc',
  1812. tableId: '103001Table4',
  1813. tableName: '项目物料表',
  1814. columnProp: 'partTypeDesc',
  1815. headerAlign: 'center',
  1816. align: 'center',
  1817. columnLabel: '产品类型',
  1818. columnHidden: false,
  1819. columnImage: false,
  1820. columnSortable: false,
  1821. sortLv: 0,
  1822. status: true,
  1823. fixed: '',
  1824. columnWidth: 120
  1825. },
  1826. {
  1827. userId: this.$store.state.user.name,
  1828. functionId: 102001,
  1829. serialNumber: '103001Table4Type',
  1830. tableId: '103001Table4',
  1831. tableName: '项目物料表',
  1832. columnProp: 'type',
  1833. headerAlign: 'center',
  1834. align: 'center',
  1835. columnLabel: '制造类型',
  1836. columnHidden: false,
  1837. columnImage: false,
  1838. columnSortable: false,
  1839. sortLv: 0,
  1840. status: true,
  1841. fixed: '',
  1842. columnWidth: 120
  1843. },
  1844. {
  1845. userId: this.$store.state.user.name,
  1846. functionId: 102001,
  1847. serialNumber: '103001Table4UmId',
  1848. tableId: '103001Table4',
  1849. tableName: '项目物料表',
  1850. columnProp: 'umId',
  1851. headerAlign: 'center',
  1852. align: 'center',
  1853. columnLabel: '单位',
  1854. columnHidden: false,
  1855. columnImage: false,
  1856. columnSortable: false,
  1857. sortLv: 0,
  1858. status: true,
  1859. fixed: '',
  1860. columnWidth: 100
  1861. },
  1862. ],
  1863. columnAddressList: [
  1864. {
  1865. userId: this.$store.state.user.name,
  1866. functionId: 103001,
  1867. serialNumber: '103001Table4AddressName',
  1868. tableId: '103001Table4',
  1869. tableName: '联系地址表',
  1870. columnProp: 'addressName',
  1871. headerAlign: 'center',
  1872. align: 'center',
  1873. columnLabel: '联系地址',
  1874. columnHidden: false,
  1875. columnImage: false,
  1876. status: true,
  1877. fixed: '',
  1878. },
  1879. {
  1880. userId: this.$store.state.user.name,
  1881. functionId: 103001,
  1882. serialNumber: '103001Table4ContactStatus',
  1883. tableId: '103001Table4',
  1884. tableName: '联系地址表',
  1885. columnProp: 'addressStatus',
  1886. headerAlign: 'center',
  1887. align: 'center',
  1888. columnLabel: '地址状态',
  1889. columnHidden: false,
  1890. columnImage: false,
  1891. status: true,
  1892. fixed: '',
  1893. },
  1894. ],
  1895. columnContactList: [
  1896. {
  1897. userId: this.$store.state.user.name,
  1898. functionId: 103001,
  1899. serialNumber: '103001Table5ContactName',
  1900. tableId: '103001Table5',
  1901. tableName: '客户联系人表',
  1902. columnProp: 'contactName',
  1903. headerAlign: 'center',
  1904. align: 'center',
  1905. columnLabel: '客户负责人',
  1906. columnHidden: false,
  1907. columnImage: false,
  1908. status: true,
  1909. fixed: '',
  1910. },
  1911. {
  1912. userId: this.$store.state.user.name,
  1913. functionId: 103001,
  1914. serialNumber: '103001Table5ContactPhoneNumber1',
  1915. tableId: '103001Table5',
  1916. tableName: '客户联系人表',
  1917. columnProp: 'contactPhoneNumber1',
  1918. headerAlign: 'center',
  1919. align: 'center',
  1920. columnLabel: '联系方式',
  1921. columnHidden: false,
  1922. columnImage: false,
  1923. status: true,
  1924. fixed: '',
  1925. },
  1926. {
  1927. userId: this.$store.state.user.name,
  1928. functionId: 103001,
  1929. serialNumber: '103001Table5PrimaryContact',
  1930. tableId: '103001Table5',
  1931. tableName: '客户联系人表',
  1932. columnProp: 'primaryContact',
  1933. headerAlign: 'center',
  1934. align: 'center',
  1935. columnLabel: '默认联系人',
  1936. columnHidden: false,
  1937. columnImage: false,
  1938. status: true,
  1939. fixed: '',
  1940. },
  1941. {
  1942. userId: this.$store.state.user.name,
  1943. functionId: 103001,
  1944. serialNumber: '103001Table5ContactStatus',
  1945. tableId: '103001Table5',
  1946. tableName: '客户联系人表',
  1947. columnProp: 'contactStatus',
  1948. headerAlign: 'center',
  1949. align: 'center',
  1950. columnLabel: '人员状态',
  1951. columnHidden: false,
  1952. columnImage: false,
  1953. status: true,
  1954. fixed: '',
  1955. },
  1956. ],
  1957. // ======== 必填规则 ========
  1958. rules: {
  1959. customerNo: [
  1960. {
  1961. required: true,
  1962. message: '客户编码不能为空',
  1963. trigger: ['change', 'blur']
  1964. }
  1965. ],
  1966. trackerName: [
  1967. {
  1968. required: true,
  1969. message: 'CS不能为空',
  1970. trigger: ['change', 'blur']
  1971. }
  1972. ],
  1973. proofingNumber: [
  1974. {
  1975. required: true,
  1976. message: '打印数量不能为空',
  1977. trigger: ['change', 'blur']
  1978. }
  1979. ],
  1980. projectId: [
  1981. {
  1982. required: true,
  1983. message: '项目编码不能为空',
  1984. trigger: ['change', 'blur']
  1985. }
  1986. ],
  1987. engineerName: [
  1988. {
  1989. required: true,
  1990. message: 'NPI工程师不能为空',
  1991. trigger: ['change', 'blur']
  1992. }
  1993. ],
  1994. priorityLevel: [
  1995. {
  1996. required: true,
  1997. message: '优先等级不能为空',
  1998. trigger: ['change', 'blur']
  1999. }
  2000. ],
  2001. requiredDeliveryDate: [
  2002. {
  2003. required: true,
  2004. message: '要求交付日期不能为空',
  2005. trigger: ['change', 'blur']
  2006. }
  2007. ]
  2008. },
  2009. enterResultRules: {
  2010. actualityDeliveryDate: [
  2011. {
  2012. required: true,
  2013. message: ' ',
  2014. trigger: 'change'
  2015. }
  2016. ],
  2017. proofingResultInformation: [
  2018. {
  2019. required: true,
  2020. message: ' ',
  2021. trigger: 'change'
  2022. }
  2023. ]
  2024. },
  2025. submitResultRules: {
  2026. actualitySendSamplesDate: [
  2027. {
  2028. required: true,
  2029. message: ' ',
  2030. trigger: 'change'
  2031. }
  2032. ],
  2033. sendSamplesMethod: [
  2034. {
  2035. required: true,
  2036. message: ' ',
  2037. trigger: 'change'
  2038. }
  2039. ]
  2040. },
  2041. customerResponseRules: {
  2042. actualityReplyDate: [
  2043. {
  2044. required: true,
  2045. message: ' ',
  2046. trigger: 'change'
  2047. }
  2048. ],
  2049. confirmResults: [
  2050. {
  2051. required: true,
  2052. message: ' ',
  2053. trigger: 'change'
  2054. }
  2055. ],
  2056. confirmBy: [
  2057. {
  2058. required: true,
  2059. message: ' ',
  2060. trigger: 'change'
  2061. }
  2062. ]
  2063. },
  2064. // ======== 复选数据集 ========
  2065. proofingSelections: [],
  2066. projectPartListSelections: [],
  2067. // ======== 选中的当前行数据 ========
  2068. proofingCurrentRow: {},
  2069. // ======== 模态框开关控制 ========
  2070. filterVisible: false,
  2071. isFilterSearch: false,
  2072. filterSearchData: {},
  2073. modalFlag: false,
  2074. modalDisableFlag: false,
  2075. enterResultModalFlag: false,
  2076. submitResultModalFlag: false,
  2077. customerResponseModalFlag: false,
  2078. // 选择项目弹框开关
  2079. chooseProjectListFlag: false,
  2080. //项目搜索条件
  2081. searchProjectData: {
  2082. site: this.$store.state.user.site,
  2083. projectId: undefined,
  2084. projectName: undefined,
  2085. customerId: undefined,
  2086. },
  2087. // 项目集合
  2088. projectList: [],
  2089. addressModelFlag: false,
  2090. contactModelFlag: false,
  2091. columnFieldList1: [],
  2092. columnFieldList2: [],
  2093. ossColumns: [
  2094. {
  2095. userId: this.$store.state.user.name,
  2096. functionId: 103001,
  2097. serialNumber: '103001Table2FileName',
  2098. tableId: '103001Table2',
  2099. tableName: '文件信息表',
  2100. columnProp: 'fileName',
  2101. headerAlign: 'center',
  2102. align: 'center',
  2103. columnLabel: '文件名称',
  2104. columnHidden: false,
  2105. columnImage: false,
  2106. columnSortable: false,
  2107. sortLv: 0,
  2108. status: true,
  2109. fixed: '',
  2110. columnWidth: 140
  2111. },
  2112. {
  2113. userId: this.$store.state.user.name,
  2114. functionId: 103001,
  2115. serialNumber: '103001Table2FileRemark',
  2116. tableId: '103001Table2',
  2117. tableName: '文件信息表',
  2118. columnProp: 'fileRemark',
  2119. headerAlign: 'center',
  2120. align: 'center',
  2121. columnLabel: '备注',
  2122. columnHidden: false,
  2123. columnImage: false,
  2124. columnSortable: false,
  2125. sortLv: 0,
  2126. status: true,
  2127. fixed: '',
  2128. columnWidth: 240
  2129. },
  2130. // {
  2131. // userId: this.$store.state.user.name,
  2132. // functionId: 103001,
  2133. // serialNumber: '103001Table2OrderRef3',
  2134. // tableId: '103001Table2',
  2135. // tableName: '文件信息表',
  2136. // columnProp: 'orderRef3',
  2137. // headerAlign: 'center',
  2138. // align: 'center',
  2139. // columnLabel: '文件描述',
  2140. // columnHidden: false,
  2141. // columnImage: false,
  2142. // columnSortable: false,
  2143. // sortLv: 0,
  2144. // status: true,
  2145. // fixed: '',
  2146. // columnWidth: 120
  2147. // },
  2148. {
  2149. userId: this.$store.state.user.name,
  2150. functionId: 103001,
  2151. serialNumber: '103001Table2CreateDate',
  2152. tableId: '103001Table2',
  2153. tableName: '文件信息表',
  2154. columnProp: 'createDate',
  2155. headerAlign: 'center',
  2156. align: 'center',
  2157. columnLabel: '上传时间',
  2158. columnHidden: false,
  2159. columnImage: false,
  2160. columnSortable: false,
  2161. sortLv: 0,
  2162. status: true,
  2163. fixed: '',
  2164. columnWidth: 140
  2165. },
  2166. {
  2167. userId: this.$store.state.user.name,
  2168. functionId: 103001,
  2169. serialNumber: '103001Table2CreatedBy',
  2170. tableId: '103001Table2',
  2171. tableName: '文件信息表',
  2172. columnProp: 'createBy',
  2173. headerAlign: 'center',
  2174. align: 'center',
  2175. columnLabel: '上传人',
  2176. columnHidden: false,
  2177. columnImage: false,
  2178. columnSortable: false,
  2179. sortLv: 0,
  2180. status: true,
  2181. fixed: '',
  2182. columnWidth: 140
  2183. }
  2184. ],
  2185. rejectVisible: false,
  2186. rejectOpinion: '',
  2187. detailVisible: false,
  2188. no: 1,
  2189. size: 20,
  2190. total: 0,
  2191. queryLoading: false,
  2192. superAdmin: false,
  2193. }
  2194. },
  2195. mounted() {
  2196. this.$nextTick(() => {
  2197. this.height = window.innerHeight / 2 - 100;
  2198. /*第二个表格高度的动态调整*/
  2199. this.secondHeight = window.innerHeight / 2 - 206;
  2200. })
  2201. },
  2202. created() {
  2203. this.handleRouteQuery()
  2204. this.checkSuperAdmin()
  2205. },
  2206. activated() {
  2207. this.handleRouteQuery()
  2208. },
  2209. methods: {
  2210. // 校验是否为超级管理员
  2211. checkSuperAdmin () {
  2212. checkSuperAdmin().then(({data}) => {
  2213. this.superAdmin = data.superAdmin
  2214. })
  2215. },
  2216. handleRouteQuery() {
  2217. if (this.$route.params.type === 'tokenLogin') {
  2218. let params = {
  2219. site: this.$route.params.site,
  2220. proofingNo: this.$route.params.docNo,
  2221. limit: this.pageSize,
  2222. createBy: this.$store.state.user.name,
  2223. page: 1,
  2224. menuId: this.$route.meta.menuId,
  2225. }
  2226. this.dataListLoading = true
  2227. proofingInformationSearch(params).then(({data}) => {
  2228. if (data && data.code === 0) {
  2229. this.dataList = data.page.list
  2230. this.totalPage = data.page.totalCount
  2231. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2232. // 判断是否全部存在数据
  2233. if (this.totalPage > 0) {
  2234. //设置选中行
  2235. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2236. //加载当前的页签的table
  2237. this.refreshCurrentTabTable()
  2238. this.proofingClickRow(this.dataList[0])
  2239. this.updateModal(this.dataList[0])
  2240. } else {
  2241. //设置选中行
  2242. this.$refs.proofingTable.setCurrentRow({})
  2243. // 加载当前的页签的table
  2244. this.refreshCurrentTabTable()
  2245. this.testClickRow({})
  2246. }
  2247. }
  2248. this.dataListLoading = false
  2249. })
  2250. } else if (this.$route.params.proofingNo) {
  2251. this.searchData.proofingNo = this.$route.params.proofingNo
  2252. this.getDataList();
  2253. setTimeout(() => {
  2254. this.searchData.proofingNo = ''
  2255. }, 200)
  2256. } else {
  2257. this.getDataList();
  2258. }
  2259. },
  2260. // ======== 分页相关方法 ========
  2261. /**
  2262. * 每页数
  2263. * @param val
  2264. */
  2265. sizeChangeHandle(val) {
  2266. this.pageSize = val
  2267. this.pageIndex = 1
  2268. if ( this.isFilterSearch === false){
  2269. this.getDataList()
  2270. } else {
  2271. this.searchByAnyField(this.filterSearchData)
  2272. }
  2273. },
  2274. /**
  2275. * 当前页
  2276. * @param val
  2277. */
  2278. currentChangeHandle(val) {
  2279. this.pageIndex = val
  2280. if ( this.isFilterSearch === false){
  2281. this.getDataList()
  2282. } else {
  2283. this.searchByAnyField(this.filterSearchData)
  2284. }
  2285. },
  2286. // ======== 复选框操作相关方法 ========
  2287. /**
  2288. * 选中一行
  2289. * @param row
  2290. */
  2291. projectPartClickRow(row) {
  2292. if (this.modalData.flag === '1') {
  2293. this.$refs.projectPartTable.toggleRowSelection(row);
  2294. this.confirmProjectPart();
  2295. }
  2296. },
  2297. /**
  2298. * 多选
  2299. * @param val
  2300. */
  2301. selectionProjectPart(val) {
  2302. this.projectPartListSelections = val
  2303. },
  2304. /**
  2305. * 获取唯一值一般都为 id
  2306. * @param row
  2307. * @returns {*}
  2308. */
  2309. getRowKeys(row) {
  2310. return row.testPartNo;
  2311. },
  2312. /**
  2313. * 未知
  2314. * @returns {boolean}
  2315. */
  2316. selectFlag() {
  2317. return true;
  2318. },
  2319. // ======== 页签切换相关方法 ========
  2320. /**
  2321. * 列表表格选择替换
  2322. * @param tab
  2323. * @param event
  2324. */
  2325. tabClick(tab, event) {
  2326. // 刷新列表数据
  2327. this.refreshCurrentTabTable()
  2328. },
  2329. /**
  2330. * 当前值发生变化的时候修改
  2331. * @param row
  2332. * @param oldRow
  2333. */
  2334. changeCurrentRow(row, oldRow) {
  2335. // 判断是否是获取焦点的事件
  2336. if (row) {
  2337. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2338. //刷新当前页表
  2339. this.refreshCurrentTabTable()
  2340. }
  2341. },
  2342. /**
  2343. * 刷新页签的table数据
  2344. */
  2345. refreshCurrentTabTable() {
  2346. if (this.activeTable === 'proofing_result') {
  2347. this.getProofingResult()
  2348. } else if (this.activeTable === 'project_information') {
  2349. this.getProjectInformation()
  2350. } else if (this.activeTable === 'customer_information') {
  2351. this.getCustomerInformation()
  2352. }
  2353. // else if (this.activeTable === 'proofing_file') {
  2354. // this.getProofingFile()
  2355. // }
  2356. },
  2357. // getProofingFile(){
  2358. //
  2359. // },
  2360. // ======== 列表数据刷新方法 ========
  2361. /**
  2362. * 获取数据列表
  2363. */
  2364. getDataList() {
  2365. if (localStorage.getItem('proofingData') !== undefined) {
  2366. let data = JSON.parse(localStorage.getItem('proofingData'));
  2367. if (data) {
  2368. this.searchData.proofingNo = data.proofingNo
  2369. }
  2370. localStorage.removeItem('proofingData');
  2371. }
  2372. this.searchData.limit = this.pageSize
  2373. this.searchData.page = this.pageIndex
  2374. let params = {
  2375. ...this.searchData,
  2376. createBy: this.$store.state.user.name,
  2377. }
  2378. proofingInformationSearch(params).then(({data}) => {
  2379. if (data.code === 0) {
  2380. this.dataList = data.page.list
  2381. this.pageIndex = data.page.currPage
  2382. this.pageSize = data.page.pageSize
  2383. this.totalPage = data.page.totalCount
  2384. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2385. // 判断是否全部存在数据
  2386. if (this.totalPage > 0) {
  2387. //设置选中行
  2388. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2389. //加载当前的页签的table
  2390. this.refreshCurrentTabTable()
  2391. this.proofingClickRow(this.dataList[0])
  2392. } else {
  2393. //设置选中行
  2394. this.$refs.proofingTable.setCurrentRow({})
  2395. // 加载当前的页签的table
  2396. this.refreshCurrentTabTable()
  2397. this.testClickRow({})
  2398. }
  2399. }
  2400. this.isFilterSearch = false
  2401. this.dataListLoading = false
  2402. })
  2403. },
  2404. /**
  2405. * 获取打样结果列表
  2406. */
  2407. getProofingResult() {
  2408. let tempData = {
  2409. site: this.$store.state.user.site,
  2410. proofingNo: this.proofingCurrentRow.proofingNo
  2411. }
  2412. // 打样结果对象
  2413. proofingResultSearch(tempData).then(({data}) => {
  2414. if (data && data.code === 0) {
  2415. this.proofingResultData = data.rows[0]
  2416. } else {
  2417. this.proofingResultData = {}
  2418. }
  2419. })
  2420. // 附件列表
  2421. this.getFileContentData()
  2422. },
  2423. /**
  2424. * 获取项目信息
  2425. */
  2426. getProjectInformation() {
  2427. let tempData = {
  2428. site: this.$store.state.user.site,
  2429. projectId: this.proofingCurrentRow.projectId
  2430. }
  2431. // 报价结果对象
  2432. getProjectInformation(tempData).then(({data}) => {
  2433. if (data && data.code === 0) {
  2434. this.projectInformationData = data.rows[0]
  2435. } else {
  2436. this.projectInformationData = {}
  2437. }
  2438. })
  2439. },
  2440. /**
  2441. * 获取客户信息
  2442. */
  2443. getCustomerInformation() {
  2444. let tempData = {
  2445. site: this.$store.state.user.site,
  2446. customerNo: this.proofingCurrentRow.customerNo
  2447. }
  2448. // 报价结果对象
  2449. getCustomerInformation(tempData).then(({data}) => {
  2450. if (data && data.code === 0) {
  2451. this.customerInformationData = data.rows[0]
  2452. } else {
  2453. this.customerInformationData = {}
  2454. }
  2455. })
  2456. },
  2457. // ======== 新增/编辑模态框 ========
  2458. /**
  2459. * 报价信息新增模态框
  2460. */
  2461. addModal() {
  2462. this.searchDelegateAccessByUser();
  2463. this.modalDisableFlag = false
  2464. this.modalFlag = true
  2465. },
  2466. /**
  2467. * 报价信息编辑模态框
  2468. * @param row
  2469. */
  2470. async updateModal(row) {
  2471. await this.getNodeAuthority(row)
  2472. this.modalData = {
  2473. flag: '2',
  2474. title: '打样编辑-' + row.proofingNo,
  2475. site: row.site,
  2476. proofingNo: row.proofingNo,
  2477. customerNo: row.customerNo,
  2478. customerDesc: row.customerDesc,
  2479. projectId: row.projectId,
  2480. projectName: row.projectName,
  2481. tracker: row.tracker,
  2482. trackerName: row.trackerName,
  2483. testPartNo: row.testPartNo,
  2484. partName: row.partName,
  2485. engineer: row.engineer,
  2486. engineerName: row.engineerName,
  2487. approver: row.approver,
  2488. approverName: row.approverName,
  2489. priorityLevel: row.priorityLevel,
  2490. proofingNumber: row.proofingNumber,
  2491. requiredDeliveryDate: row.requiredDeliveryDate,
  2492. remark: row.remark,
  2493. technicalConsiderations: row.technicalConsiderations,
  2494. isNeedToSendSamples: row.isNeedToSendSamples,
  2495. sendSamplesAddress: row.sendSamplesAddress,
  2496. consignee: row.consignee,
  2497. consigneeContact: row.consigneeContact,
  2498. actualityDeliveryDate: row.actualityDeliveryDate,
  2499. proofingResultInformation: row.proofingResultInformation,
  2500. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2501. sendSamplesMethod: row.sendSamplesMethod,
  2502. deliverGoodsInformation: row.deliverGoodsInformation,
  2503. deliverGoodsRemark: row.deliverGoodsRemark,
  2504. actualityReplyDate: row.actualityReplyDate,
  2505. confirmResults: row.confirmResults,
  2506. confirmBy: row.confirmBy,
  2507. confirmInformation: row.confirmInformation,
  2508. proofingStatus: row.proofingStatus,
  2509. proofingResultStatus: row.proofingResultStatus,
  2510. nextToDo: row.nextToDo,
  2511. updateBy: this.$store.state.user.name,
  2512. nodeConclusion: '',
  2513. stepId: row.stepId,
  2514. rejectFlag: row.rejectFlag,
  2515. rejectStepId: row.rejectStepId,
  2516. isReject: row.isReject,
  2517. nodeId: row.nodeId,
  2518. approvalUsername: row.approvalUsername,
  2519. proofingAmount: row.proofingAmount,
  2520. }
  2521. this.searchDelegateAccessByUser();
  2522. this.modalDisableFlag = true
  2523. this.modalFlag = true
  2524. },
  2525. async getDetailData(row) {
  2526. this.detailVisible = true
  2527. await this.getNodeAuthority(row)
  2528. this.modalData = {
  2529. flag: '2',
  2530. title: '打样编辑-' + row.proofingNo,
  2531. site: row.site,
  2532. proofingNo: row.proofingNo,
  2533. customerNo: row.customerNo,
  2534. customerDesc: row.customerDesc,
  2535. projectId: row.projectId,
  2536. projectName: row.projectName,
  2537. tracker: row.tracker,
  2538. trackerName: row.trackerName,
  2539. testPartNo: row.testPartNo,
  2540. partName: row.partName,
  2541. engineer: row.engineer,
  2542. engineerName: row.engineerName,
  2543. approver: row.approver,
  2544. approverName: row.approverName,
  2545. priorityLevel: row.priorityLevel,
  2546. proofingNumber: row.proofingNumber,
  2547. requiredDeliveryDate: row.requiredDeliveryDate,
  2548. remark: row.remark,
  2549. technicalConsiderations: row.technicalConsiderations,
  2550. isNeedToSendSamples: row.isNeedToSendSamples,
  2551. sendSamplesAddress: row.sendSamplesAddress,
  2552. consignee: row.consignee,
  2553. consigneeContact: row.consigneeContact,
  2554. actualityDeliveryDate: row.actualityDeliveryDate,
  2555. proofingResultInformation: row.proofingResultInformation,
  2556. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2557. sendSamplesMethod: row.sendSamplesMethod,
  2558. deliverGoodsInformation: row.deliverGoodsInformation,
  2559. deliverGoodsRemark: row.deliverGoodsRemark,
  2560. actualityReplyDate: row.actualityReplyDate,
  2561. confirmResults: row.confirmResults,
  2562. confirmBy: row.confirmBy,
  2563. confirmInformation: row.confirmInformation,
  2564. proofingStatus: row.proofingStatus,
  2565. proofingResultStatus: row.proofingResultStatus,
  2566. nextToDo: row.nextToDo,
  2567. updateBy: this.$store.state.user.name,
  2568. nodeConclusion: '',
  2569. stepId: row.stepId,
  2570. rejectFlag: row.rejectFlag,
  2571. rejectStepId: row.rejectStepId,
  2572. isReject: row.isReject,
  2573. nodeId: row.nodeId
  2574. }
  2575. this.searchDelegateAccessByUser();
  2576. this.modalDisableFlag = true
  2577. this.modalFlag = true
  2578. },
  2579. // ======== 新增/编辑/删除方法 ========
  2580. /**
  2581. * 获取项目物料列表
  2582. */
  2583. openModalDialog() {
  2584. if (this.modalData.proofingNo) {
  2585. this.searchDelegateAccess();
  2586. }
  2587. if (this.modalData.flag !== '1'){
  2588. this.projectPartData.testPartNo = this.modalData.testPartNo;
  2589. }else {
  2590. this.projectPartData.testPartNo = '';
  2591. }
  2592. this.getProjectPartList();
  2593. },
  2594. getProjectPartList() {
  2595. if (!this.modalData.projectId) {
  2596. this.projectPartList = [];
  2597. return
  2598. }
  2599. // 先清空缓存选中
  2600. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2601. // 拿到选中的产品编号
  2602. let projectPartList = this.modalData.testPartNo.split(';')
  2603. this.projectPartData.projectId = this.modalData.projectId;
  2604. // 查询所有项目物料
  2605. let params = {
  2606. ...this.projectPartData,
  2607. no:this.no,
  2608. size:this.size,
  2609. }
  2610. this.queryLoading = true
  2611. getProjectPartList(params).then(({data}) => {
  2612. if (data && data.code === 0) {
  2613. this.projectPartList = data.rows
  2614. this.total = data.total
  2615. this.projectPartList.forEach(val => {
  2616. // 回显选中的项目物料
  2617. if (projectPartList.includes(val.testPartNo)) {
  2618. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  2619. }
  2620. })
  2621. // this.projectPartModelFlag = true
  2622. } else {
  2623. this.$message.warning(data.msg)
  2624. }
  2625. this.queryLoading = false
  2626. }).catch(error => {
  2627. this.queryLoading = false
  2628. this.$message.error(error)
  2629. })
  2630. },
  2631. /**
  2632. * 确认多选项目物料
  2633. */
  2634. confirmProjectPart() {
  2635. this.modalData.testPartNo = ''
  2636. this.modalData.partName = ''
  2637. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2638. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2639. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2640. }
  2641. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2642. this.modalData.partName = this.modalData.partName.substring(1)
  2643. this.projectPartModelFlag = false
  2644. },
  2645. /**
  2646. * 客户信息新增/编辑
  2647. */
  2648. saveData() {
  2649. this.$refs.modalForm.validate((valid, obj) => {
  2650. if (!valid) {
  2651. let i = 1;
  2652. for (let key in obj) {
  2653. this.$message.error(obj[key][0].message);
  2654. if (i === 1){
  2655. return
  2656. }
  2657. i++;
  2658. }
  2659. } else {
  2660. if (this.projectPartListSelections.length <= 0) {
  2661. this.$message.warning('请选择项目料号')
  2662. return
  2663. }
  2664. this.confirmProjectPart();
  2665. // 将选中的 人员信息添加到请求
  2666. this.modalData.delegateAccessList = this.selectionDelegateAccess
  2667. if (this.modalData.flag === '1') {
  2668. this.saveProofing()
  2669. } else {
  2670. this.updateProofing()
  2671. }
  2672. }
  2673. })
  2674. },
  2675. updateProofing() {
  2676. proofingInformationEdit(this.modalData).then(({data}) => {
  2677. if (data && data.code === 0) {
  2678. this.getDataList()
  2679. this.modalFlag = false
  2680. this.$message({
  2681. message: '操作成功',
  2682. type: 'success',
  2683. duration: 1500,
  2684. onClose: () => {
  2685. }
  2686. })
  2687. } else {
  2688. this.$alert(data.msg, '错误', {
  2689. confirmButtonText: '确定'
  2690. })
  2691. }
  2692. })
  2693. },
  2694. saveProofing() {
  2695. proofingInformationSave(this.modalData).then(({data}) => {
  2696. if (data && data.code === 0) {
  2697. this.searchData.proofingNo = data.proofingNo
  2698. this.getDataList()
  2699. this.modalFlag = false
  2700. this.$message.success('操作成功')
  2701. } else {
  2702. this.$alert(data.msg, '错误', {
  2703. confirmButtonText: '确定'
  2704. })
  2705. }
  2706. })
  2707. },
  2708. /**
  2709. * 验证必填项
  2710. */
  2711. validateDataValue() {
  2712. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2713. this.$message.warning('请选择客户编码!')
  2714. return
  2715. }
  2716. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2717. this.$message.warning('请选择客户名称!')
  2718. return
  2719. }
  2720. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  2721. this.$message.warning('请选择CS编码!')
  2722. return
  2723. }
  2724. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2725. this.$message.warning('请选择CS名称!')
  2726. return
  2727. }
  2728. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2729. this.$message.warning('请选择项目编码!')
  2730. return
  2731. }
  2732. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2733. this.$message.warning('请选择项目名称!')
  2734. return
  2735. }
  2736. // if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2737. // this.$message.warning('请选择工程师编码!')
  2738. // return
  2739. // }
  2740. // if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  2741. // this.$message.warning('请选择工程师名称!')
  2742. // return
  2743. // }
  2744. if (!this.modalData.proofingNumber && this.modalData.proofingNumber > 0) {
  2745. this.$message.warning('请输入正确的打样数量!')
  2746. return
  2747. }
  2748. // if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2749. // this.$message.warning('请选择优先等级!')
  2750. // return
  2751. // }
  2752. if (!this.modalData.requiredDeliveryDate) {
  2753. this.$message.warning('请输入要求交付日期!')
  2754. return
  2755. }
  2756. },
  2757. /**
  2758. * 打样信息删除
  2759. */
  2760. delModal() {
  2761. if (this.proofingSelections.length === 0) {
  2762. this.$message.warning('请勾选要删除的打样信息!')
  2763. return
  2764. }
  2765. for (let i = 0; i < this.proofingSelections.length; i++) {
  2766. let row = this.proofingSelections[i]
  2767. if (row.proofingStatus !== '草稿') {
  2768. this.$message.warning(row.proofingNo + "不是草稿状态,不能删除!")
  2769. return
  2770. }
  2771. }
  2772. this.$confirm(`是否删除这 ` + this.proofingSelections.length + ` 条打样信息?`, '提示', {
  2773. confirmButtonText: '确定',
  2774. cancelButtonText: '取消',
  2775. type: 'warning'
  2776. }).then(() => {
  2777. let tempData = {
  2778. informationList: this.proofingSelections
  2779. }
  2780. proofingInformationDelete(tempData).then(({data}) => {
  2781. if (data && data.code === 0) {
  2782. this.getDataList()
  2783. this.proofingSelections = []
  2784. this.$message({
  2785. message: '操作成功',
  2786. type: 'success',
  2787. duration: 1500,
  2788. onClose: () => {
  2789. }
  2790. })
  2791. } else {
  2792. this.$alert(data.msg, '错误', {
  2793. confirmButtonText: '确定'
  2794. })
  2795. }
  2796. })
  2797. }).catch(() => {
  2798. })
  2799. },
  2800. // ======== 列表操作方法 ========
  2801. /**
  2802. * 单机选中报价信息
  2803. * @param row
  2804. */
  2805. proofingClickRow(row) {
  2806. // this.$refs.proofingTable.toggleRowSelection(row)
  2807. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2808. this.proofingDetailData = JSON.parse(JSON.stringify(row))
  2809. this.getApprovalList()
  2810. },
  2811. /**
  2812. * 复选报价信息
  2813. * @param val
  2814. */
  2815. selectionProofing(val) {
  2816. this.proofingSelections = val
  2817. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  2818. },
  2819. // ======== 报价结果相关方法 ========
  2820. /**
  2821. * 封装录入方法
  2822. */
  2823. packProofingResultModal() {
  2824. // 重置对象
  2825. this.enterResultData = {
  2826. site: this.$store.state.user.site,
  2827. proofingNo: '',
  2828. actualityDeliveryDate: new Date(),
  2829. proofingResultInformation: '',
  2830. proofingResultStatus: 'E',
  2831. fileContentList: [],
  2832. updateBy: this.$store.state.user.name
  2833. }
  2834. // 获得选中的打样号
  2835. // if (this.proofingSelections.length > 0) {
  2836. // this.proofingSelections.forEach(val => {
  2837. // this.enterResultData.proofingNo += ';' + val.proofingNo
  2838. // })
  2839. // this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  2840. // } else {
  2841. // this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2842. // }
  2843. this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2844. // // 获得这些打样号的全部附件
  2845. // this.getFileContentList()
  2846. this.enterResultModalFlag = true
  2847. },
  2848. /**
  2849. * 录入打样结果
  2850. */
  2851. proofingResultModal() {
  2852. // // 如果有选中打样单
  2853. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2854. // let tempData = {
  2855. // currentStatus: 'C',
  2856. // informationList: this.proofingSelections,
  2857. // }
  2858. // // 检查打样单状态
  2859. // checkProofingStatus(tempData).then(({data}) => {
  2860. // if (data && data.code === 0) {
  2861. // if (data.flag === 1) { // 状态一致
  2862. // this.packProofingResultModal()
  2863. // } else { // 状态不同
  2864. // this.$message.warning('选中的打样单进度有误,请确认!')
  2865. // }
  2866. // } else {
  2867. // this.$alert(data.msg, '错误', {
  2868. // confirmButtonText: '确定'
  2869. // })
  2870. // }
  2871. // })
  2872. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2873. // this.packProofingResultModal()
  2874. // }
  2875. this.packProofingResultModal()
  2876. },
  2877. /**
  2878. * 保存打样结果
  2879. */
  2880. saveProofingResult() {
  2881. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  2882. this.$message.warning('请选择实际交付日期!')
  2883. return
  2884. }
  2885. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  2886. this.$message.warning('请填写打样结果信息!')
  2887. return
  2888. }
  2889. // if (this.proofingSelections.length > 1) {
  2890. // this.$confirm(`是否录入多条打样结果?`, '提示', {
  2891. // confirmButtonText: '确定',
  2892. // cancelButtonText: '取消',
  2893. // type: 'warning'
  2894. // }).then(() => {
  2895. // saveProofingResult(this.enterResultData).then(({data}) => {
  2896. // if (data && data.code === 0) {
  2897. // this.getDataList()
  2898. // this.enterResultModalFlag = false
  2899. // this.$message({
  2900. // message: '操作成功',
  2901. // type: 'success',
  2902. // duration: 1500,
  2903. // onClose: () => {}
  2904. // })
  2905. // } else {
  2906. // this.$alert(data.msg, '错误', {
  2907. // confirmButtonText: '确定'
  2908. // })
  2909. // }
  2910. // })
  2911. // }).catch(() => {
  2912. // })
  2913. // } else {
  2914. saveProofingResult(this.enterResultData).then(({data}) => {
  2915. if (data && data.code === 0) {
  2916. this.getDataList()
  2917. this.enterResultModalFlag = false
  2918. this.$message({
  2919. message: '操作成功',
  2920. type: 'success',
  2921. duration: 1500,
  2922. onClose: () => {
  2923. }
  2924. })
  2925. } else {
  2926. this.$alert(data.msg, '错误', {
  2927. confirmButtonText: '确定'
  2928. })
  2929. }
  2930. })
  2931. // }
  2932. },
  2933. /**
  2934. * 封装送样方法
  2935. */
  2936. packSubmitProofingModal() {
  2937. this.submitResultData = {
  2938. site: this.$store.state.user.site,
  2939. proofingNo: '',
  2940. actualitySendSamplesDate: new Date(),
  2941. sendSamplesMethod: '',
  2942. deliverGoodsInformation: '',
  2943. deliverGoodsRemark: '',
  2944. proofingResultStatus: 'S',
  2945. updateBy: this.$store.state.user.name,
  2946. }
  2947. // 获得选中的打样号
  2948. // if (this.proofingSelections.length > 0) {
  2949. // this.proofingSelections.forEach(val => {
  2950. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2951. // })
  2952. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2953. // } else {
  2954. // this.submitResultData.quotationNo = this.proofingCurrentRow.quotationNo
  2955. // }
  2956. this.submitResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2957. this.submitResultModalFlag = true
  2958. },
  2959. /**
  2960. * 提交送样信息
  2961. */
  2962. submitProofingModal() {
  2963. // // 如果有选中打样单
  2964. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2965. // let tempData = {
  2966. // currentStatus: 'E',
  2967. // informationList: this.proofingSelections,
  2968. // }
  2969. // // 检查打样单状态
  2970. // checkProofingStatus(tempData).then(({data}) => {
  2971. // if (data && data.code === 0) {
  2972. // if (data.flag === 1) { // 状态一致
  2973. // this.packSubmitProofingModal()
  2974. // } else { // 状态不同
  2975. // this.$message.warning('选中的打样单进度有误,请确认!')
  2976. // }
  2977. // } else {
  2978. // this.$alert(data.msg, '错误', {
  2979. // confirmButtonText: '确定'
  2980. // })
  2981. // }
  2982. // })
  2983. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2984. // this.packSubmitProofingModal()
  2985. // }
  2986. this.packSubmitProofingModal()
  2987. },
  2988. /**
  2989. * 保存送样结果
  2990. */
  2991. saveSubmitResult() {
  2992. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  2993. this.$message.warning('请选择实际送样日期!')
  2994. return
  2995. }
  2996. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  2997. this.$message.warning('请选择送样方式!')
  2998. return
  2999. }
  3000. // if (this.proofingSelections.length > 1) {
  3001. // this.$confirm(`是否提交多条送样信息?`, '提示', {
  3002. // confirmButtonText: '确定',
  3003. // cancelButtonText: '取消',
  3004. // type: 'warning'
  3005. // }).then(() => {
  3006. // saveSubmitResult(this.submitResultData).then(({data}) => {
  3007. // if (data && data.code === 0) {
  3008. // this.getDataList()
  3009. // this.submitResultModalFlag = false
  3010. // this.$message({
  3011. // message: '操作成功',
  3012. // type: 'success',
  3013. // duration: 1500,
  3014. // onClose: () => {}
  3015. // })
  3016. // } else {
  3017. // this.$alert(data.msg, '错误', {
  3018. // confirmButtonText: '确定'
  3019. // })
  3020. // }
  3021. // })
  3022. // }).catch(() => {
  3023. // })
  3024. // } else {
  3025. saveSubmitResult(this.submitResultData).then(({data}) => {
  3026. if (data && data.code === 0) {
  3027. this.getDataList()
  3028. this.submitResultModalFlag = false
  3029. this.$message({
  3030. message: '操作成功',
  3031. type: 'success',
  3032. duration: 1500,
  3033. onClose: () => {
  3034. }
  3035. })
  3036. } else {
  3037. this.$alert(data.msg, '错误', {
  3038. confirmButtonText: '确定'
  3039. })
  3040. }
  3041. })
  3042. // }
  3043. },
  3044. /**
  3045. * 封装回复方法
  3046. */
  3047. packCustomerResponseModal() {
  3048. this.customerResponseData = {
  3049. site: this.$store.state.user.site,
  3050. proofingNo: '',
  3051. actualityReplyDate: new Date(),
  3052. confirmResults: '接受',
  3053. confirmBy: '',
  3054. confirmInformation: '',
  3055. proofingResultStatus: 'R',
  3056. updateBy: this.$store.state.user.name
  3057. }
  3058. // 获得选中的打样号
  3059. // if (this.proofingSelections.length > 0) {
  3060. // this.proofingSelections.forEach(val => {
  3061. // this.customerResponseData.proofingNo += ';' + val.proofingNo
  3062. // })
  3063. // this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  3064. // } else {
  3065. // this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  3066. // }
  3067. this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  3068. this.customerResponseModalFlag = true
  3069. },
  3070. /**
  3071. * 客户回复
  3072. */
  3073. customerResponseModal() {
  3074. // // 如果有选中打样单
  3075. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  3076. // let tempData = {
  3077. // currentStatus: 'S',
  3078. // informationList: this.proofingSelections,
  3079. // }
  3080. // // 检查打样单状态
  3081. // checkProofingStatus(tempData).then(({data}) => {
  3082. // if (data && data.code === 0) {
  3083. // if (data.flag === 1) { // 状态一致
  3084. // this.packCustomerResponseModal()
  3085. // } else { // 状态不同
  3086. // this.$message.warning('选中的打样单进度有误,请确认!')
  3087. // }
  3088. // } else {
  3089. // this.$alert(data.msg, '错误', {
  3090. // confirmButtonText: '确定'
  3091. // })
  3092. // }
  3093. // })
  3094. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  3095. // this.packCustomerResponseModal()
  3096. // }
  3097. this.packCustomerResponseModal()
  3098. },
  3099. /**
  3100. * 保存客户回复
  3101. */
  3102. saveCustomerResponse() {
  3103. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  3104. this.$message.warning('请选择实际回复日期!')
  3105. return
  3106. }
  3107. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  3108. this.$message.warning('请选择客户确认结果!')
  3109. return
  3110. }
  3111. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  3112. this.$message.warning('请填写客户确认人!')
  3113. return
  3114. }
  3115. // if (this.proofingSelections.length > 1) {
  3116. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  3117. // confirmButtonText: '确定',
  3118. // cancelButtonText: '取消',
  3119. // type: 'warning'
  3120. // }).then(() => {
  3121. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3122. // if (data && data.code === 0) {
  3123. // this.getDataList()
  3124. // this.customerResponseModalFlag = false
  3125. // this.$message({
  3126. // message: '操作成功',
  3127. // type: 'success',
  3128. // duration: 1500,
  3129. // onClose: () => {}
  3130. // })
  3131. // } else {
  3132. // this.$alert(data.msg, '错误', {
  3133. // confirmButtonText: '确定'
  3134. // })
  3135. // }
  3136. // })
  3137. // }).catch(() => {
  3138. // })
  3139. // } else {
  3140. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3141. if (data && data.code === 0) {
  3142. this.getDataList()
  3143. this.customerResponseModalFlag = false
  3144. this.$message({
  3145. message: '操作成功',
  3146. type: 'success',
  3147. duration: 1500,
  3148. onClose: () => {
  3149. }
  3150. })
  3151. } else {
  3152. this.$alert(data.msg, '错误', {
  3153. confirmButtonText: '确定'
  3154. })
  3155. }
  3156. })
  3157. // }
  3158. },
  3159. // ======== 报价单附件的相关方法 ========
  3160. /**
  3161. * 获取报价单附件列表
  3162. */
  3163. getFileContentData() {
  3164. let currentData = {
  3165. orderRef1: this.$store.state.user.site,
  3166. orderRef2: this.proofingCurrentRow.proofingNo
  3167. }
  3168. getFileContentList(currentData).then(({data}) => {
  3169. if (data && data.code === 0) {
  3170. this.fileContentList = data.rows
  3171. } else {
  3172. this.fileContentList = []
  3173. }
  3174. })
  3175. },
  3176. // /**
  3177. // * 获得这些报价号的全部附件
  3178. // */
  3179. // getFileContentList () {
  3180. // let currentData = {
  3181. // orderRef1: this.$store.state.user.site,
  3182. // orderRef2: this.enterResultData.proofingNo
  3183. // }
  3184. // getFileContentList(currentData).then(({data}) => {
  3185. // if (data && data.code === 0) {
  3186. // this.enterResultData.fileContentList = data.rows
  3187. // } else {
  3188. // this.enterResultData.fileContentList = []
  3189. // }
  3190. // })
  3191. // },
  3192. /**
  3193. * 上传文件
  3194. */
  3195. uploadFile() {
  3196. let currentData = {
  3197. titleCon: '打样附件上传',
  3198. site: this.$store.state.user.site,
  3199. createBy: this.$store.state.user.name,
  3200. proofingNo: this.enterResultData.proofingNo,
  3201. fileRemark: '',
  3202. folder: 'proofingFile',
  3203. // options: []
  3204. }
  3205. // let num = 0
  3206. // let arr = this.enterResultData.proofingNo.split(';')
  3207. // arr.forEach(val => {
  3208. // currentData.options.push({key: num++, value: val})
  3209. // })
  3210. //打开组件 去做新增业务
  3211. this.$nextTick(() => {
  3212. this.$refs.proofingUploadFile.init(currentData)
  3213. })
  3214. },
  3215. /**
  3216. * 文件删除
  3217. * @param row
  3218. */
  3219. deleteFile(row) {
  3220. this.$confirm('确定要删除此文件?', '提示', {
  3221. confirmButtonText: '确定',
  3222. cancelButtonText: '取消',
  3223. type: 'warning'
  3224. }).then(() => {
  3225. deleteProofingFile(row).then(({data}) => {
  3226. if (data && data.code === 0) {
  3227. this.getFileContentList()
  3228. this.$message({
  3229. message: '操作成功',
  3230. type: 'success',
  3231. duration: 1500,
  3232. onClose: () => {
  3233. }
  3234. })
  3235. } else {
  3236. this.$alert(data.msg, '错误', {
  3237. confirmButtonText: '确定'
  3238. })
  3239. }
  3240. })
  3241. }).catch(() => {
  3242. })
  3243. },
  3244. /**
  3245. * 文件下载
  3246. * @param row
  3247. */
  3248. downloadFile(row) {
  3249. downLoadQuotationFile(row).then(({data}) => {
  3250. // 不限制文件下载类型
  3251. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  3252. // 下载文件名称
  3253. const fileName = row.fileName
  3254. // a标签下载
  3255. const linkNode = document.createElement('a')
  3256. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3257. linkNode.style.display = 'none'
  3258. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3259. document.body.appendChild(linkNode)
  3260. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3261. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3262. document.body.removeChild(linkNode)
  3263. })
  3264. },
  3265. /**
  3266. * 获取该客户的客户地址
  3267. */
  3268. getCustomerAddressList() {
  3269. let tempData = {
  3270. site: this.$store.state.user.site,
  3271. customerNo: this.modalData.customerNo,
  3272. addressType: 'A'
  3273. }
  3274. customerAddressSearch(tempData).then(({data}) => {
  3275. if (data && data.code === 0) {
  3276. this.addressList = data.rows
  3277. this.addressModelFlag = true
  3278. } else {
  3279. this.addressList = []
  3280. }
  3281. })
  3282. },
  3283. // 双击选择负责人
  3284. getAddressData(row) {
  3285. this.modalData.sendSamplesAddress = row.addressName
  3286. this.addressModelFlag = false
  3287. },
  3288. /**
  3289. * 获取该客户的客户负责人
  3290. */
  3291. getCustomerContactList() {
  3292. let tempData = {
  3293. site: this.$store.state.user.site,
  3294. customerNo: this.modalData.customerNo
  3295. }
  3296. customerContactSearch(tempData).then(({data}) => {
  3297. if (data && data.code === 0) {
  3298. this.contactList = data.rows
  3299. this.contactModelFlag = true
  3300. } else {
  3301. this.contactList = []
  3302. }
  3303. })
  3304. },
  3305. // 双击选择负责人
  3306. getContactData(row) {
  3307. this.modalData.consignee = row.contactName
  3308. this.modalData.consigneeContact = row.contactPhoneNumber1
  3309. this.contactModelFlag = false
  3310. },
  3311. // ======== chooseList相关方法 ========
  3312. /**
  3313. * 获取基础数据列表S
  3314. * @param val
  3315. * @param type
  3316. */
  3317. getBaseList(val, type) {
  3318. this.tagNo = val
  3319. this.tagNo1 = type
  3320. this.$nextTick(() => {
  3321. let strVal = ''
  3322. let conSql = ''
  3323. if (val === 102) {
  3324. if (type === 1) {
  3325. strVal = this.modalData.customerNo
  3326. }
  3327. }
  3328. // if (val === 103) {
  3329. // if(type === 1) {
  3330. // strVal = this.modalData.tracker
  3331. // }
  3332. // if(type === 2) {
  3333. // strVal = this.modalData.engineer
  3334. // }
  3335. // }
  3336. if (val === 104) {
  3337. if (type === 1) {
  3338. strVal = this.modalData.projectId
  3339. }
  3340. }
  3341. if (val === 2051) {
  3342. strVal = this.modalData.trackerName
  3343. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3344. }
  3345. if (val === 2052) {
  3346. strVal = this.modalData.engineerName
  3347. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3348. }
  3349. if (val === 2053) {
  3350. strVal = this.modalData.approverName
  3351. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3352. }
  3353. this.$refs.baseList.init(val, strVal, conSql)
  3354. })
  3355. },
  3356. /**
  3357. * 列表方法的回调
  3358. * @param val
  3359. */
  3360. getBaseData(val) {
  3361. if (this.tagNo === 102) {
  3362. if (this.tagNo1 === 1) {
  3363. if (val.Customer_no === this.modalData.customerNo) {
  3364. return
  3365. }
  3366. this.modalData.customerNo = val.Customer_no
  3367. this.modalData.customerDesc = val.Customer_desc
  3368. this.modalData.projectId = undefined
  3369. this.modalData.projectName = undefined
  3370. this.projectPartList = []
  3371. }
  3372. }
  3373. // if (this.tagNo === 103) {
  3374. // if(this.tagNo1 === 1) {
  3375. // this.modalData.tracker = val.username
  3376. // this.modalData.trackerName = val.user_display
  3377. // }
  3378. // if(this.tagNo1 === 2) {
  3379. // this.modalData.engineer = val.username
  3380. // this.modalData.engineerName = val.user_display
  3381. // }
  3382. // }
  3383. if (this.tagNo === 104) {
  3384. if (this.tagNo1 === 1) {
  3385. this.modalData.projectId = val.project_id
  3386. this.modalData.projectName = val.project_name
  3387. this.getProjectPartList();
  3388. }
  3389. }
  3390. if (this.tagNo === 2051) {
  3391. this.modalData.tracker = val.username
  3392. this.modalData.trackerName = val.user_display
  3393. }
  3394. if (this.tagNo === 2052) {
  3395. this.modalData.engineer = val.username
  3396. this.modalData.engineerName = val.user_display
  3397. }
  3398. if (this.tagNo === 2053) {
  3399. this.modalData.approver = val.username
  3400. this.modalData.approverName = val.user_display
  3401. }
  3402. },
  3403. // ======== 导出相关方法 ========
  3404. /**
  3405. * 导出excel
  3406. */
  3407. async createExportData() {
  3408. this.searchData.limit = -1
  3409. this.searchData.page = 1
  3410. await proofingInformationSearch(this.searchData).then(({data}) => {
  3411. this.resultList = data.page.list
  3412. })
  3413. return this.resultList
  3414. },
  3415. startDownload() {
  3416. },
  3417. finishDownload() {
  3418. },
  3419. fields() {
  3420. let json = '{'
  3421. this.columnList.forEach((item, index) => {
  3422. if (index === this.columnList.length - 1) {
  3423. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3424. } else {
  3425. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3426. }
  3427. })
  3428. json += '}'
  3429. let s = eval('(' + json + ')')
  3430. return s
  3431. },
  3432. closeModalDiaLog() {
  3433. this.$refs.modalForm.resetFields();
  3434. this.modalData = {
  3435. flag: '1',
  3436. title: '打样新增',
  3437. site: this.$store.state.user.site,
  3438. proofingNo: '',
  3439. customerNo: '',
  3440. customerDesc: '',
  3441. projectId: '',
  3442. projectName: '',
  3443. tracker: '',
  3444. trackerName: '',
  3445. approver: '',
  3446. approverName: '',
  3447. testPartNo: '',
  3448. partName: '',
  3449. engineer: '',
  3450. engineerName: '',
  3451. priorityLevel: '',
  3452. proofingNumber: 1,
  3453. requiredDeliveryDate: '',
  3454. remark: '',
  3455. technicalConsiderations: '',
  3456. isNeedToSendSamples: '',
  3457. sendSamplesAddress: '',
  3458. consignee: '',
  3459. consigneeContact: '',
  3460. actualityDeliveryDate: '',
  3461. proofingResultInformation: '',
  3462. actualitySendSamplesDate: '',
  3463. sendSamplesMethod: '',
  3464. deliverGoodsInformation: '',
  3465. deliverGoodsRemark: '',
  3466. actualityReplyDate: '',
  3467. confirmResults: '',
  3468. confirmBy: '',
  3469. confirmInformation: '',
  3470. proofingStatus: '草稿',
  3471. proofingResultStatus: 'B',
  3472. nextToDo: '',
  3473. createBy: this.$store.state.user.name,
  3474. nodeId: ''
  3475. };
  3476. this.selectionDelegateAccess = [];
  3477. this.projectPartList = [];
  3478. this.activeName = 'part'
  3479. Object.keys(this.proofingDelegateAccess).forEach(key => {
  3480. this.proofingDelegateAccess[key] = '';
  3481. })
  3482. },
  3483. checkSelectable(row, index) {
  3484. if (this.modalData.flag === '1') {
  3485. return true
  3486. } else {
  3487. return false
  3488. }
  3489. },
  3490. projectClickRow(row) {
  3491. this.modalData.projectId = row.projectId
  3492. this.modalData.projectName = row.projectName
  3493. this.getProjectPartList()
  3494. this.chooseProjectListFlag = false
  3495. },
  3496. // 查询searchProjectInfoList
  3497. searchProjectInfoList() {
  3498. this.projectList = [];
  3499. this.searchProjectData.customerId = this.modalData.customerNo
  3500. searchProjectInfoList(this.searchProjectData).then(({data}) => {
  3501. if (data && data.code === 0) {
  3502. this.projectList = data.rows
  3503. } else {
  3504. this.projectList = []
  3505. }
  3506. }).catch((error) => {
  3507. this.$message.error('查询项目信息失败')
  3508. })
  3509. },
  3510. closeProjectInfoDialog() {
  3511. this.$refs.closeProjectInfoForm.resetFields();
  3512. this.searchProjectData = {
  3513. site: this.$store.state.user.site,
  3514. projectId: undefined,
  3515. projectName: undefined,
  3516. customerId: undefined,
  3517. }
  3518. },
  3519. rowStyle({row}) {
  3520. if (this.proofingCurrentRow.proofingNo === row.proofingNo) {
  3521. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3522. }
  3523. },
  3524. updateModalStatus(row, status) {
  3525. this.$confirm(`是否确认下达?`, '提示', {
  3526. confirmButtonText: '确定',
  3527. cancelButtonText: '取消',
  3528. type: 'warning'
  3529. }).then(() => {
  3530. let params = JSON.parse(JSON.stringify(row))
  3531. params.proofingResultStatus = status;
  3532. params.proofingStatus = '下达';
  3533. params.userName = this.$store.state.user.name
  3534. params.menuId = this.$route.meta.menuId
  3535. proofingInformationEditStatus(params).then(({data}) => {
  3536. if (data && data.code === 0) {
  3537. this.getDataList()
  3538. this.modalFlag = false
  3539. this.$message.success('打样单已下达')
  3540. } else {
  3541. this.$alert(data.msg, '错误', {
  3542. confirmButtonText: '确定'
  3543. })
  3544. }
  3545. })
  3546. })
  3547. },
  3548. searchDelegateAccessByUser() {
  3549. // 角色 ROO7 的用户
  3550. let params = {
  3551. ...this.proofingDelegateAccess,
  3552. site: this.$store.state.user.site,
  3553. }
  3554. searchDelegateAccessByUser(params).then(({data}) => {
  3555. if (data && data.code === 0) {
  3556. this.baseDelegateAccessList = data.rows;
  3557. } else {
  3558. this.$message.warning(data.msg)
  3559. }
  3560. }).catch((error) => {
  3561. this.$message.error(error)
  3562. })
  3563. },
  3564. handleSelectionChange(val) {
  3565. // 获得选中的 用户
  3566. this.selectionDelegateAccess2 = val;
  3567. },
  3568. handleTableClick(row, column, event, val) {
  3569. // 表格行点击选择
  3570. this.$refs[val].toggleRowSelection(row);
  3571. },
  3572. openDelegateAccess() {
  3573. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  3574. if (rows && rows.length > 0) {
  3575. this.$nextTick(() => {
  3576. rows.forEach(item => {
  3577. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  3578. this.$refs.delegateAccesstTable.toggleRowSelection(row);
  3579. })
  3580. })
  3581. }
  3582. },
  3583. closeDelegateAccess() {
  3584. this.selectionDelegateAccess2 = [];
  3585. },
  3586. confirmDelegateAccess() {
  3587. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  3588. this.delegateAccessVisible = false;
  3589. },
  3590. searchDelegateAccess() {
  3591. let params = {
  3592. site: this.modalData.site,
  3593. proofingNo: this.modalData.proofingNo,
  3594. }
  3595. searchDelegateAccess(params).then(({data}) => {
  3596. if (data && data.code === 0) {
  3597. this.selectionDelegateAccess = data.rows.map(item => {
  3598. return {
  3599. delegateAccess: item.delegateAccess,
  3600. delegateAccessName: item.delegateAccessName,
  3601. }
  3602. })
  3603. } else {
  3604. this.$message.warning(data.msg)
  3605. }
  3606. }).catch((error) => {
  3607. this.$message.error(error)
  3608. })
  3609. },
  3610. // 同意提交
  3611. agreeSubmit() {
  3612. this.$confirm(`是否确认提交?`, '提示', {
  3613. confirmButtonText: '确定',
  3614. cancelButtonText: '取消',
  3615. type: 'warning'
  3616. }).then(() => {
  3617. this.modalData.nodeConclusion = 'Y'
  3618. this.submitData()
  3619. })
  3620. },
  3621. // 驳回提交
  3622. rejectSubmit() {
  3623. this.$confirm(`是否确认驳回?`, '提示', {
  3624. confirmButtonText: '确定',
  3625. cancelButtonText: '取消',
  3626. type: 'warning'
  3627. }).then(() => {
  3628. this.modalData.rejectOpinion = this.rejectOpinion
  3629. this.modalData.nodeConclusion = 'N'
  3630. this.submitData()
  3631. })
  3632. },
  3633. // 提交
  3634. submitData() {
  3635. if (this.columnFieldList1) {
  3636. for (let i = 0; i < this.columnFieldList1.length; i++) {
  3637. let row = this.columnFieldList1[i]
  3638. if (!this.modalData[row.fieldId] && row.required === 'Y') {
  3639. this.$message.error(row.fieldName + '不能为空')
  3640. return
  3641. }
  3642. }
  3643. }
  3644. // if (this.columnFieldList2) {
  3645. // if (!this.delegateAccessName) {
  3646. // this.$message.error('Delegate Access不能为空')
  3647. // return;
  3648. // }
  3649. // }
  3650. let tempData = {
  3651. ...this.modalData,
  3652. userName: this.$store.state.user.name,
  3653. menuId: this.$route.meta.menuId,
  3654. }
  3655. submitChange(tempData).then(({data}) => {
  3656. if (data && data.code === 0) {
  3657. this.getDataList()
  3658. this.$message({message: '操作成功', type: 'success'})
  3659. this.rejectVisible = false
  3660. this.submitModalFlag = false
  3661. this.modalFlag = false
  3662. } else {
  3663. this.$alert(data.msg, '错误', {
  3664. confirmButtonText: '确定'
  3665. })
  3666. }
  3667. })
  3668. },
  3669. // 获取流程的配置权限
  3670. async getNodeAuthority(row) {
  3671. let tempData = {
  3672. site: row.site,
  3673. stepId: row.stepId,
  3674. menuId: this.$route.meta.menuId
  3675. }
  3676. await getNodeAuthority(tempData).then(({data}) => {
  3677. if (data && data.code === 0) {
  3678. this.columnFieldList1 = data.rows.plm_proofing_information
  3679. this.columnFieldList2 = data.rows.plm_proofing_delegate_access
  3680. }
  3681. })
  3682. },
  3683. handleQueryCustomer() {
  3684. let params = {
  3685. site: this.$store.state.user.site,
  3686. customerNo: this.modalData.customerNo
  3687. }
  3688. queryCustomer(params).then(({data}) => {
  3689. if (data && data.code === 0) {
  3690. if (data.rows && data.rows.length === 1) {
  3691. this.modalData.customerDesc = data.rows[0].customerDesc
  3692. } else {
  3693. this.modalData.customerDesc = ''
  3694. }
  3695. } else {
  3696. this.$message.warning(data.msg)
  3697. }
  3698. }).catch((error) => {
  3699. this.$message.error(error)
  3700. })
  3701. },
  3702. handleQueryProjectByCustomer() {
  3703. let params = {
  3704. site: this.$store.state.user.site,
  3705. customerId: this.modalData.customerNo,
  3706. projectId: this.modalData.projectId
  3707. }
  3708. queryProjectByCustomer(params).then(({data}) => {
  3709. if (data && data.code === 0) {
  3710. if (data.rows && data.rows.length === 1) {
  3711. this.modalData.projectName = data.rows[0].projectName
  3712. } else {
  3713. this.modalData.projectName = ''
  3714. }
  3715. } else {
  3716. this.$message.warning(data.msg)
  3717. }
  3718. }).catch((error) => {
  3719. this.$message.error(error)
  3720. })
  3721. },
  3722. // 查询审批信息
  3723. getApprovalList() {
  3724. let tempData = {
  3725. site: this.$store.state.user.site,
  3726. menuId: this.$route.meta.menuId,
  3727. documentNo: this.proofingCurrentRow.proofingNo,
  3728. }
  3729. getApprovalList(tempData).then(({data}) => {
  3730. if (data && data.code === 0) {
  3731. this.approvalList = data.rows
  3732. } else {
  3733. this.approvalList = []
  3734. }
  3735. })
  3736. },
  3737. handleRouter(row){
  3738. this.modalFlag = false
  3739. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
  3740. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  3741. } else {
  3742. this.$router.push({name:`part-partInformation`,params:{partNo:row.testPartNo},})
  3743. }
  3744. },
  3745. clearModalData(filed){
  3746. this.modalData[filed] = ''
  3747. },
  3748. handleSizeChange(val){
  3749. this.size = val
  3750. this.getProjectPartList();
  3751. },
  3752. handleCurrentChange(val){
  3753. this.no = val
  3754. this.getProjectPartList();
  3755. },
  3756. searchByAnyField(params){
  3757. params.site = this.$store.state.user.site
  3758. params.menuId = '103001'
  3759. params.no = this.pageIndex
  3760. params.size = this.pageSize
  3761. proofingInformationSearchAny(params).then(({data})=>{
  3762. if (data && data.code === 0){
  3763. this.dataList = data.page.list
  3764. this.totalPage = data.page.totalCount
  3765. }else {
  3766. this.$message.warning(data.msg)
  3767. }
  3768. }).catch((error)=>{
  3769. this.$message.error(error)
  3770. })
  3771. this.filterSearchData = params
  3772. this.isFilterSearch = true
  3773. this.filterVisible = false
  3774. },
  3775. }
  3776. }
  3777. </script>
  3778. <style scoped lang="scss">
  3779. /deep/ .customer-tab .el-tabs__content {
  3780. padding: 0px !important;
  3781. height: 300px;
  3782. }
  3783. .right /deep/ .el-input__inner {
  3784. text-align: right;
  3785. }
  3786. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3787. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3788. -webkit-appearance: none;
  3789. }
  3790. /deep/ .inlineNumber input[type="number"] {
  3791. -moz-appearance: textfield;
  3792. padding-right: 5px !important;
  3793. }
  3794. </style>