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.

3957 lines
135 KiB

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