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.

3737 lines
126 KiB

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