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.

3863 lines
131 KiB

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