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.

3615 lines
128 KiB

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