|
|
@@ -3,7 +3,7 @@
|
|
|
<el-container>
|
|
|
<!-- 左侧树侧形结构-->
|
|
|
<el-aside width="300px">
|
|
|
- <div class="JKWTree-tree" style="height: 746px">
|
|
|
+ <div class="JKWTree-tree" style="height: 346px">
|
|
|
<h3> 产品管理</h3>
|
|
|
<!-- <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>-->
|
|
|
<el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
|
|
|
@@ -17,17 +17,17 @@
|
|
|
<!-- 右侧内容区域 -->
|
|
|
<el-container>
|
|
|
<el-main>
|
|
|
-
|
|
|
<!-- 搜索框 -->
|
|
|
<div class="gva-search-box">
|
|
|
<el-form ref="elSearchFormRef" :inline="true" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
|
|
|
<!-- 左侧查询输入框 -->
|
|
|
+
|
|
|
<el-form-item>
|
|
|
<el-input v-model="searchInfo.keyword" placeholder="搜索产品编号或产品名称" clearable style="width: 200px;"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <!-- 查询和重置按钮 -->
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="search" @click="onSubmit">查询</el-button>
|
|
|
+
|
|
|
+ <el-button type="primary" icon="search" @click="onSubmit" style="margin-left: 10px">查询</el-button>
|
|
|
+<!-- <el-button icon="refresh" @click="onReset">重置</el-button>-->
|
|
|
+<!-- <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>-->
|
|
|
|
|
|
<el-button type="primary" icon="edit" @click="onStatusClick">状态设置</el-button>
|
|
|
<el-dialog v-model="onstatuslist" title="状态设置" width="20%" style="height: 25%; position: fixed; bottom: 35%; left: 40%">
|
|
|
@@ -41,55 +41,136 @@
|
|
|
</div>
|
|
|
<div style="width: 100%; display: flex; justify-content: center; align-items: flex-end; height: 35%;">
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center;">
|
|
|
- <el-button @click="handleCancel">取 消</el-button>
|
|
|
- <el-button type="primary" @click="handleConfirm">确定</el-button>
|
|
|
+ <el-button type="primary" @click="handleConfirm">执行</el-button>
|
|
|
+ <el-button @click="handleCancel">放弃</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+<!-- <el-button type="primary" disabled icon="edit" @click="" style="margin-left: 10px">工艺方案复制</el-button>-->
|
|
|
+
|
|
|
<el-button type="primary" icon="edit" @click="gygmClick" style="margin-left: 10px">工艺方案更名</el-button>
|
|
|
<el-dialog v-model="gygmlist" title="工艺方案更名" width="40%" style="height: 40%; position: fixed; bottom: 30%; left: 30%">
|
|
|
<div style="display: flex; flex-direction: column; height: 100%;">
|
|
|
<el-form-item label="产品代号:" prop="process">
|
|
|
- <el-input v-model="formData['process']" :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
+ <el-input v-model="gyformData['process']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
</el-form-item>
|
|
|
<br>
|
|
|
<el-form-item label=" " prop="processName">
|
|
|
- <el-input v-model="formData['processName']" disabled :clearable="true" placeholder="" style="width: 100%;" />
|
|
|
+ <el-input v-model="gyformData['processName']" disabled :clearable="true" placeholder="" style="width: 100%;" />
|
|
|
</el-form-item>
|
|
|
<br>
|
|
|
<el-form-item label="工艺方案原名:" prop="originalName">
|
|
|
- <el-input v-model="formData['originalName']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
+ <el-select v-model="gyformData.originalName" placeholder="请选择" style="width: 160px;">
|
|
|
+ <el-option v-for="option in gyformData.originalNameOptions" :key="option" :label="option" :value="option" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<br>
|
|
|
<el-form-item label="工艺方案新名:" prop="newName" >
|
|
|
- <el-input v-model="formData['newName']" :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
+ <el-input v-model="gyformData['newName']" :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<div class="dialog-footer" style="margin-top: 15px; margin-left: 280px;">
|
|
|
- <el-button @click="gygmhandleCancel">取 消</el-button>
|
|
|
- <el-button type="primary" @click="gygmhandleConfirm">确定</el-button>
|
|
|
+ <el-button type="primary" @click="gygmhandleConfirm">执行</el-button>
|
|
|
+
|
|
|
+ <el-button @click="gygmhandleCancel">放弃</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
-<!-- <el-button icon="refresh" @click="onReset">重置</el-button>-->
|
|
|
-<!-- <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>-->
|
|
|
- <el-button type="primary" disabled icon="Download" @click="cpexportToExcel" style="margin-left: 10px">导出产品资料</el-button>
|
|
|
- <el-dialog v-model="cpdialogexportToExcel" title="导出产品资料" width="50%">
|
|
|
- <!-- 在这里放入弹出页面的内容 -->
|
|
|
+ <el-button type="primary" icon="edit" @click="fjClick" style="margin-left: 10px">工艺方案附加</el-button>
|
|
|
+ <el-dialog v-model="fjlist" title="工艺方案附加" width="1400px" style="height: 740px;bottom: 6%;">
|
|
|
+ <div>
|
|
|
+ <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
+ <el-form-item label="当前产品:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
|
|
|
+ <el-input v-model="fjformData['process']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-input v-model="fjformData['processName']" disabled :clearable="true" placeholder="" style="flex: 1;"/>
|
|
|
+ <el-form-item label="工艺方案:" prop="originalName" style="margin-left: 20px;">
|
|
|
+ <el-select v-model="fjformData.originalName" placeholder="请选择" style="width: 160px;" @change="handleOriginalNameChange">
|
|
|
+ <el-option v-for="option in fjformData.originalNameOptions" :key="option" :label="option" :value="option" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
+ <el-form-item label="当前产品:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
|
|
|
+ <el-input v-model="fjformData['dqprocess']" :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-input v-model="fjformData['dqprocessName']" :clearable="true" placeholder="" style="flex: 1;"/>
|
|
|
+ <el-form-item label="工艺方案:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
|
|
|
+ <el-input v-model="fjformData['dqoriginalName']" :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
|
|
|
+ <el-table ref="multipleTable"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ style="width: 100%;height: 450px" border tooltip-effect="dark"
|
|
|
+ :data="fjtableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column align="left" label="方案" prop="方案" width="70"/>
|
|
|
+ <el-table-column align="left" label="印件" prop="Gy0_yjno" width="70"/>
|
|
|
+ <el-table-column align="left" label="序号" prop="Gy0_gxh" width="70"/>
|
|
|
+ <el-table-column align="left" label="备注" prop="remark" width="70"/>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ <div class="dialog-footer" style="margin-top: 14px; margin-left: 50%;">
|
|
|
+ <el-button type="primary" @click="fjbzgx">附加标准工序</el-button>
|
|
|
+ <el-button type="primary" @click="gxdqcpgx">更新当前产品工序</el-button>
|
|
|
+ <el-button type="primary" @click="fjhandleConfirm">建立工艺方案</el-button>
|
|
|
+ <el-button type="primary" @click="fjhandleCancel">放弃操作</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
+<!-- 点击附加标准工序弹出框-->
|
|
|
+ <el-button type="primary" icon="edit" @click="fjbzgxClick" style="margin-left: 10px;display: none" >工艺方案附加</el-button>
|
|
|
+ <el-dialog v-model="fjbzgxlist" title="附加标准工序" width="1400px" style="height: 740px;bottom: 6%;">
|
|
|
+ <div>
|
|
|
+ <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
+ <el-form-item label="当前产品:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
|
|
|
+ <el-input v-model="fjbzgxformData['process']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-input v-model="fjbzgxformData['processName']" disabled :clearable="true" placeholder="" style="flex: 1;"/>
|
|
|
+ <el-form-item label="工艺方案:" prop="originalName" style="margin-left: 20px;">
|
|
|
+ <el-select v-model="ffjbzgxformData.originalName" placeholder="请选择" style="width: 160px;">
|
|
|
+ <el-option v-for="option in fjbzgxformData.originalNameOptions" :key="option" :label="option" :value="option" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-table ref="multipleTable"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ style="width: 100%;height: 450px" border tooltip-effect="dark"
|
|
|
+ :data="fjbzgxtableData" row-key="ID" @selection-change="fjbzgxhandleSelectionChange">
|
|
|
+ <el-table-column align="left" label="附加方案" prop="programme" width="70"/>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ <div class="dialog-footer" style="margin-top: 14px; margin-left: 50%;">
|
|
|
+ <el-button type="primary" @click="fjbzgxzx">执行</el-button>
|
|
|
+ <el-button type="primary" @click="fjbzgxfq">放弃</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+<!-- <el-button type="primary" disabled icon="edit" @click="gygmClick" style="margin-left: 10px">计损色数修正</el-button>-->
|
|
|
+<!-- <el-button type="primary" disabled icon="edit" @click="" style="margin-left: 10px">质检废品系数</el-button>-->
|
|
|
+
|
|
|
+ <el-button type="primary" disabled icon="Download" @click="cpexportToExcel" style="margin-left: 10px">导出产品资料</el-button>
|
|
|
+ <el-dialog v-model="cpdialogexportToExcel" title="导出产品资料" width="50%">
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<el-button type="primary" disabled icon="Download" @click="gyexportToExcel" style="margin-left: 10px">导出工艺流程</el-button>
|
|
|
<el-dialog v-model="gydialogexportToExcel" title="导出工艺流程" width="50%">
|
|
|
- <!-- 在这里放入弹出页面的内容 -->
|
|
|
- <p>这是弹出页面的内容 导出工艺流程</p>
|
|
|
-
|
|
|
</el-dialog>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -98,11 +179,15 @@
|
|
|
<div class="gva-table-box">
|
|
|
<!-- 数据表格 -->
|
|
|
<el-table ref="multipleTable"
|
|
|
- style="width: 100%;height: 580px;"
|
|
|
+ style="width: 100%;height: 40vh"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
border
|
|
|
tooltip-effect="dark"
|
|
|
:data="tableData"
|
|
|
row-key="ID"
|
|
|
+ :row-class-name="tableRowClass"
|
|
|
highlight-current-row="true"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
@row-dblclick="updateCompanyFunc"
|
|
|
@@ -129,27 +214,30 @@
|
|
|
<el-table-column align="left" label="工艺" prop="gyData" width="100"/>
|
|
|
<el-table-column align="left" label="印件数" prop="yjData" width="100" />
|
|
|
</el-table>
|
|
|
- <div class="gva-pagination">
|
|
|
- <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page"
|
|
|
- :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"
|
|
|
- @current-change="handleCurrentChange" @size-change="handleSizeChange" />
|
|
|
- </div>
|
|
|
+<!-- <div class="gva-pagination">-->
|
|
|
+<!-- <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page"-->
|
|
|
+<!-- :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"-->
|
|
|
+<!-- @current-change="handleCurrentChange" @size-change="handleSizeChange" />-->
|
|
|
+<!-- </div>-->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
+ <!-- 表格下的表格 -->
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
|
|
|
<el-tab-pane label="印件资料" @click="showTable('印件资料')" name="first">
|
|
|
<el-table ref="multipleTable"
|
|
|
:show-overflow-tooltip="true"
|
|
|
highlight-current-row="true"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
@row-dblclick="yjupdateCompanyFunc"
|
|
|
- style="width: 100%;height: 400px" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
+ style="width: 100%;height: 330px" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column align="left" label="印件号" prop="yj_yjno" width="80"/>
|
|
|
<el-table-column align="left" label="印件代号" prop="yj_yjdh" width="100" />
|
|
|
- <el-table-column align="left" label="印件名称" prop="yj_yjmc" width="340" />
|
|
|
+ <el-table-column align="left" label="印件名称" prop="yj_yjmc" width="540" />
|
|
|
<el-table-column align="left" label="纸张单号" prop="yj_zzdh" width="100"/>
|
|
|
<el-table-column align="left" label="纸张名称" prop="yj_zzmc" width="340"/>
|
|
|
<el-table-column align="left" label="投料规格" prop="yj_tlgg" width="240"/>
|
|
|
@@ -167,11 +255,16 @@
|
|
|
<el-table ref="multipleTable"
|
|
|
highlight-current-row="true"
|
|
|
:show-overflow-tooltip="true"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
@row-dblclick="gyupdateCompanyFunc"
|
|
|
- style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
+ :row-class-name="rowClassStyle"
|
|
|
+ style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange"
|
|
|
+ @row-click="clickybupdate">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column align="left" label="方案" prop="方案" width="70"/>
|
|
|
- <el-table-column align="left" label="印件" prop="Gy0_yjno" width="70" />
|
|
|
+ <el-table-column align="left" label="印件" prop="Gy0_yjno" width="80" />
|
|
|
<el-table-column align="left" label="工序" prop="Gy0_gxh" width="70" />
|
|
|
<el-table-column align="left" label="工序名称" prop="gy0_gxmc" width="120" />
|
|
|
<el-table-column align="left" label="工序名称" prop="add_gxmc" width="340" />
|
|
|
@@ -197,11 +290,16 @@
|
|
|
<el-tab-pane label="印版资料" @click="showTable('印版资料')" name="third">
|
|
|
<el-table ref="multipleTable"
|
|
|
highlight-current-row="true"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
@row-dblclick="ybupdateCompanyFunc"
|
|
|
- style="width: 100%;height: 400px" border tooltip-effect="dark" :data="ybtableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
+ style="width: 100%;height: 400px" border tooltip-effect="dark" :data="ybtableData" row-key="ID" @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
- <el-table-column align="left" label="方案" prop="YB_方案" width="100"/>
|
|
|
- <el-table-column align="left" label="印件号" prop="YB_Yjno" width="100" />
|
|
|
+ <el-table-column align="left" label="方案" prop="YB_方案" width="70"/>
|
|
|
+ <el-table-column align="left" label="印件号" prop="YB_Yjno" width="80" />
|
|
|
<el-table-column align="left" label="印版类别" prop="印版类别" width="100" />
|
|
|
<el-table-column align="left" label="存货编码" prop="存货编码" width="100"/>
|
|
|
<el-table-column align="left" label="印版名称" prop="印版名称" width="440"/>
|
|
|
@@ -215,15 +313,19 @@
|
|
|
|
|
|
<el-tab-pane label="技术资料附件" @click="showTable('技术资料附件')" name="fourth">
|
|
|
<el-table ref="multipleTable"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
highlight-current-row="true"
|
|
|
style="width: 100%;height: 400px" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
- <el-table-column align="left" label="序号" prop="序号" width="100"/>
|
|
|
- <el-table-column align="left" label="适用工序" prop="适用工序" width="100" />
|
|
|
- <el-table-column align="left" label="备注" prop="备注" width="100" />
|
|
|
- <el-table-column align="left" label="文件类型" prop="文件类型" width="100"/>
|
|
|
+ <el-table-column align="left" label="序号" prop="序号" width="120"/>
|
|
|
+ <el-table-column align="left" label="适用工序" prop="适用工序" width="120" />
|
|
|
+ <el-table-column align="left" label="备注" prop="备注" width="120" />
|
|
|
+ <el-table-column align="left" label="文件类型" prop="文件类型" width="120"/>
|
|
|
<el-table-column align="left" label="关联产品" prop="关联产品" width="360"/>
|
|
|
- <el-table-column align="left" label="建档用户" prop="建档用户" width="100"/>
|
|
|
+ <el-table-column align="left" label="建档用户" prop="建档用户" width="120"/>
|
|
|
<el-table-column align="left" label="建档日期" prop="建档日期" width="160" />
|
|
|
<el-table-column align="left" label="更新日期" prop="更新日期" width="160" />
|
|
|
</el-table>
|
|
|
@@ -232,7 +334,7 @@
|
|
|
|
|
|
</el-tabs>
|
|
|
|
|
|
- <!-- 弹窗 -->
|
|
|
+ <!-- 表格弹窗 -->
|
|
|
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type==='create'?'添加产品基本资料':'修改产品基本资料'" destroy-on-close>
|
|
|
<el-row>
|
|
|
<el-scrollbar height="500px">
|
|
|
@@ -569,15 +671,32 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
currentTable: '',
|
|
|
- activeName: 'first',
|
|
|
- // 其他表格数据...
|
|
|
+ activeName: 'first'
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ tableRowClass({row,rowIndex}){
|
|
|
+ if(row.状态==="停产"){
|
|
|
+ return "warning-row"
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ rowClassStyle({row,rowIndex}){
|
|
|
+ // debugger
|
|
|
+ // if(row.Gy0_yjno===this.selection.Gy0_yjno){
|
|
|
+ // return "warning-row"
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ clickybupdate(row,column,event){
|
|
|
+ // this.selection=row
|
|
|
+ // this.rowClassStyle()
|
|
|
+
|
|
|
+ },
|
|
|
showTable(tableName) {
|
|
|
// console.log(tableName)
|
|
|
// 根据点击的按钮设置当前展示的表格
|
|
|
- this.currentTable = tableName;
|
|
|
+ // this.currentTable = tableName;
|
|
|
},
|
|
|
showTableChange() {
|
|
|
// 处理表格选中事件
|
|
|
@@ -586,7 +705,6 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
<script setup>
|
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import {createCompany, deleteCompany, deleteCompanyByIds, updateCompany, findCompany, getCompanyList} from '@/api/company'
|
|
|
@@ -594,6 +712,7 @@ import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDow
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { ref, reactive } from 'vue'
|
|
|
import {
|
|
|
+ editGyName,
|
|
|
getCustom,
|
|
|
getDepartment,
|
|
|
getProduct,
|
|
|
@@ -624,7 +743,6 @@ const onstatuslist = ref(false);
|
|
|
const status = ref('在产'); // 默认选择在产
|
|
|
const _stacode = ref(null);
|
|
|
const onStatusClick = () => {
|
|
|
- console.log('点击了状态设置');
|
|
|
if(_product_code.value == null){
|
|
|
onstatuslist.value = false;
|
|
|
alert('请选择树形后,再操作此功能');
|
|
|
@@ -633,17 +751,14 @@ const onStatusClick = () => {
|
|
|
onstatuslist.value = true;
|
|
|
}
|
|
|
};
|
|
|
-// 状态设置取消按钮
|
|
|
+// 状态设置放弃
|
|
|
const handleCancel = () => {
|
|
|
onstatuslist.value = false;
|
|
|
console.log('点击了取消');
|
|
|
};
|
|
|
-// 状态设置确定按钮
|
|
|
+// 状态设置执行
|
|
|
const handleConfirm = async () => {
|
|
|
onstatuslist.value = false;
|
|
|
- // if(_stacode.value == null){
|
|
|
- // alert('请选择树形后,再操作此功能');
|
|
|
- // }else{
|
|
|
let statusCode;
|
|
|
let code = _stacode.value;
|
|
|
if (status.value === '在产') {
|
|
|
@@ -651,39 +766,140 @@ const handleConfirm = async () => {
|
|
|
} else if (status.value === '停产') {
|
|
|
statusCode = 2;
|
|
|
}
|
|
|
- // console.log(code);console.log(statusCode);
|
|
|
const data = await setProductStatus({ code: code, status: statusCode });
|
|
|
console.log(data);
|
|
|
- // }
|
|
|
};
|
|
|
handleCancel(_stacode);
|
|
|
|
|
|
+// =========== 工艺方案附加 ===========
|
|
|
+const fjlist = ref(false);
|
|
|
+const fjformData = reactive({
|
|
|
+ process: '',//当前产品
|
|
|
+ processName: '',//产品名称
|
|
|
+ processfa: [],//工艺方案
|
|
|
+ originalName: '', // 工艺方案默认选择的值
|
|
|
+});
|
|
|
+
|
|
|
+const fjClick = () => {
|
|
|
+ console.log('点击了工艺方案附加');
|
|
|
+ if(_product_code.value == null){
|
|
|
+ fjlist.value = false;
|
|
|
+ alert('请选择分类项目,再操作此功能');
|
|
|
+ }else{
|
|
|
+ fjlist.value = true;
|
|
|
+ fjformData.process = _product_code.value;
|
|
|
+ fjformData.processName = _kehu_code.value;
|
|
|
+ if (gytableData.length === 0) {
|
|
|
+ fjlist.value = false;
|
|
|
+ alert('没有工艺资料');
|
|
|
+ } else {
|
|
|
+ const uniqueSchemeSet = new Set();
|
|
|
+ gytableData.forEach(item => {
|
|
|
+ uniqueSchemeSet.add(item['方案']);
|
|
|
+ });
|
|
|
+ const uniqueSchemeArray = Array.from(uniqueSchemeSet);
|
|
|
+ fjformData.originalNameOptions = []; // 清空原有数据
|
|
|
+ fjformData.originalNameOptions = fjformData.originalNameOptions.concat(uniqueSchemeArray);
|
|
|
+ // 设置默认选择第一个选项
|
|
|
+ if (fjformData.originalNameOptions.length > 0) {
|
|
|
+ fjformData.originalName = fjformData.originalNameOptions[0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log(fjformData.process)
|
|
|
+ // console.log(fjformData.processName)
|
|
|
+ // console.log(fjformData.originalName)
|
|
|
+ const product_code = fjformData.process
|
|
|
+ const plan = fjformData.originalName
|
|
|
+ //编号 方案 获取到了 调用接口报错
|
|
|
+ // const WorkListdata = await getProductGy(product_code:product_code,plan:plan);
|
|
|
+ // console.log(WorkListdata)
|
|
|
+
|
|
|
+ }
|
|
|
+};
|
|
|
+//附加标准工序
|
|
|
+const fjbzgx = async () => {
|
|
|
+ // let params = {}
|
|
|
+ // params.code = fjformData['dqprocess'];
|
|
|
+ // params.old_name = fjformData['dqprocessName'];
|
|
|
+ // params.new_name = fjformData['dqoriginalName'];
|
|
|
+ // console.log(params)
|
|
|
+
|
|
|
+}
|
|
|
+//更新当前产品工序
|
|
|
+const gxdqcpgx = async () => {
|
|
|
+ fjlist.value = false;
|
|
|
+};
|
|
|
+//建立工艺方案
|
|
|
+const fjhandleConfirm = async () => {
|
|
|
+ fjlist.value = false;
|
|
|
+};
|
|
|
+//放弃操作
|
|
|
+const fjhandleCancel = () => {
|
|
|
+ fjlist.value = false;
|
|
|
+};
|
|
|
+
|
|
|
// =========== 工艺方案更名 ===========
|
|
|
const gygmlist = ref(false);
|
|
|
const _gygmstacode = ref(null);
|
|
|
+const gyformData = reactive({
|
|
|
+ process: '',
|
|
|
+ processName: '',
|
|
|
+ originalNameOptions: [],
|
|
|
+ newName: '',
|
|
|
+ originalName: '', // 工艺方案默认选择的值
|
|
|
+});
|
|
|
const gygmClick = () => {
|
|
|
- console.log('点击了工艺方案更名');
|
|
|
- // _gygmstacode.value = _product_code.value;
|
|
|
- // console.log(_product_code.value);
|
|
|
+ // console.log('点击了工艺方案更名');
|
|
|
if(_product_code.value == null){
|
|
|
gygmlist.value = false;
|
|
|
- alert('请选择分类项目,然后在进入操作');
|
|
|
+ alert('请选择分类项目,再操作此功能');
|
|
|
}else{
|
|
|
gygmlist.value = true;
|
|
|
- let code = _product_code.value;
|
|
|
- console.log(code);
|
|
|
+ gyformData.process = _product_code.value;
|
|
|
+ gyformData.processName = _kehu_code.value;
|
|
|
+ if (gytableData.length === 0) {
|
|
|
+ gygmlist.value = false;
|
|
|
+ alert('没有工艺资料');
|
|
|
+ } else {
|
|
|
+ const uniqueSchemeSet = new Set();
|
|
|
+ gytableData.forEach(item => {
|
|
|
+ uniqueSchemeSet.add(item['方案']);
|
|
|
+ });
|
|
|
+ const uniqueSchemeArray = Array.from(uniqueSchemeSet);
|
|
|
+ gyformData.originalNameOptions = []; // 清空原有数据
|
|
|
+ gyformData.originalNameOptions = gyformData.originalNameOptions.concat(uniqueSchemeArray);
|
|
|
+ // 设置默认选择第一个选项
|
|
|
+ if (gyformData.originalNameOptions.length > 0) {
|
|
|
+ gyformData.originalName = gyformData.originalNameOptions[0];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
-// 状态设置取消按钮
|
|
|
+// 工艺方案更名放弃
|
|
|
const gygmhandleCancel = () => {
|
|
|
gygmlist.value = false;
|
|
|
- console.log('点击了取消');
|
|
|
};
|
|
|
-// 状态设置确定按钮
|
|
|
+// 工艺方案更名执行
|
|
|
const gygmhandleConfirm = async () => {
|
|
|
gygmlist.value = false;
|
|
|
-
|
|
|
-
|
|
|
+ let params = {}
|
|
|
+ params.code = gyformData.process;
|
|
|
+ params.old_name = gyformData.originalName;
|
|
|
+ params.new_name = gyformData.newName;
|
|
|
+ //确定后清空 工艺方案原名 输入框
|
|
|
+ gyformData.originalName = ''
|
|
|
+ //确定后清空 工艺方案新名 输入框
|
|
|
+ gyformData.newName = ''
|
|
|
+ try {
|
|
|
+ const WorkListdata = await editGyName(params);
|
|
|
+ if (WorkListdata.code === 0) {
|
|
|
+ console.log(WorkListdata.msg);
|
|
|
+ } else {
|
|
|
+ console.log(WorkListdata.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
+ }
|
|
|
};
|
|
|
gygmhandleCancel(_gygmstacode);
|
|
|
|
|
|
@@ -714,11 +930,14 @@ const gytableData = reactive([])
|
|
|
const ybtableData = reactive([])
|
|
|
//技术资料附件
|
|
|
const jstableData = reactive([])
|
|
|
+//全局调用产品编号
|
|
|
const _product_code = ref(null)
|
|
|
+//全局调用产品名称
|
|
|
+const _kehu_code = ref(null)
|
|
|
const tableRowClick = async (row) => {
|
|
|
- const product_code = row.产品编号;
|
|
|
_product_code.value = row.产品编号;
|
|
|
- const res = await getProductData({product_code:product_code});//接口
|
|
|
+ _kehu_code.value = row.产品名称;
|
|
|
+ const res = await getProductData({product_code:_product_code.value});
|
|
|
yjtableData.splice(0, yjtableData.length, ...res.data.yjData);//印件资料表格
|
|
|
gytableData.splice(0, gytableData.length, ...res.data.gyData);//工艺资料表格
|
|
|
ybtableData.splice(0, ybtableData.length, ...res.data.ybData);//印版资料表格
|
|
|
@@ -748,7 +967,7 @@ const handleCurrentChange = (val) => {
|
|
|
|
|
|
// 修改页面容量 点击多少条/页
|
|
|
const handleSizeChange = (val) => {
|
|
|
- page.value = 10;//默认显示十条
|
|
|
+ page.value = 15;//默认显示十条
|
|
|
pageSize.value = val;
|
|
|
_getProduct();
|
|
|
};
|
|
|
@@ -777,12 +996,7 @@ const onReset = () => {
|
|
|
getTableData()
|
|
|
}
|
|
|
|
|
|
-// 自动化生成的字典(可能为空)以及字段
|
|
|
-const formData = ref({
|
|
|
- address: '',
|
|
|
- image: '',
|
|
|
- name: '',
|
|
|
-})
|
|
|
+
|
|
|
|
|
|
// 验证规则
|
|
|
const rule = reactive({})
|