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.

3747 lines
127 KiB

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