|
|
@@ -10,6 +10,8 @@
|
|
|
<!-- <el-button type="primary" @click="onstatus" >设置机台状态</el-button> -->
|
|
|
<el-button type="primary" class="bt" @click="oncomplaints" >客诉记录</el-button>
|
|
|
<el-button type="primary" class="bt" @click="onClear" >换型清场</el-button>
|
|
|
+ <el-button type="primary" class="bt" @click="pd_gdprintonClick" >工单打印</el-button>
|
|
|
+ <el-button type="primary" class="bt" @click="gzSel" >员工工资查询</el-button>
|
|
|
<el-button type="primary" class="bt" @click="hesuan" v-if="AddType === true">核算参数调整</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="onxzhscsclick" class="bt" title="修正核算参数">修正核算参数</el-button>
|
|
|
<el-button type="primary" class="bt" @click="onADD" v-if="AddType === true">新增</el-button>
|
|
|
@@ -1964,7 +1966,39 @@
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
|
|
|
-
|
|
|
+<el-dialog v-model="gzSelVisible" title="员工工资明细查询"
|
|
|
+ destroy-on-close fullscreen
|
|
|
+ style="font-size: 50px;font-weight: bold;"
|
|
|
+ >
|
|
|
+ <el-button v-for="ygbh in gz_bzbh" type="primary" @click="gz_ontable(ygbh)">{{ ygbh }}</el-button>
|
|
|
+ <!-- 数据展示 -->
|
|
|
+ <el-table ref="gz_multipleTable" style="width: 100%;height: 40vh;padding-top: 5px;" tooltip-effect="dark" :data="gz_tableData" row-key="ID"
|
|
|
+ highlight-current-row="true" border :show-overflow-tooltip="true"
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ >
|
|
|
+ <el-table-column v-for="column in tableCols1"
|
|
|
+ :key="column.prop" :prop="column.prop"
|
|
|
+ :label="column.label" :width="column.width"
|
|
|
+ show-overflow-tooltip="true" sortable
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <!-- 数据展示 -->
|
|
|
+ <el-table ref="gz_multipleTable2" style="width: 100%;height: 40vh;padding-top: 30px;" tooltip-effect="dark" :data="gz_tableData2" row-key="ID"
|
|
|
+ highlight-current-row="true" border
|
|
|
+ :row-style="{ height: '20px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <el-table-column v-for="column in tableCols2"
|
|
|
+ :key="column.prop" :prop="column.prop"
|
|
|
+ :label="column.label" :width="column.width"
|
|
|
+ show-overflow-tooltip="true" sortable
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
|
|
|
<Shebeizhuangtai
|
|
|
@@ -1981,7 +2015,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+<PrintPage ref="printPageRef" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -2041,7 +2075,9 @@ import {
|
|
|
ProcessInspectionRecordsItemAdd,
|
|
|
CoefficientEdit,
|
|
|
ChromaDataEdit,
|
|
|
- PrintingModeDataEdit
|
|
|
+ PrintingModeDataEdit,
|
|
|
+ dailysearch,
|
|
|
+ dailygetGzByYgbh,
|
|
|
} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
|
import{ AccountingParameter,ProductNameData,AccountingParameterEdit} from "@/api/yunyin/yunying";
|
|
|
import {
|
|
|
@@ -2057,14 +2093,17 @@ import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDow
|
|
|
import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { ref, reactive } from 'vue'
|
|
|
-import { useUserStore } from '@/pinia/modules/user'
|
|
|
+import { useUserStore } from '@/pinia/modules/user'
|
|
|
+import PrintPage from './components/print.vue'
|
|
|
+
|
|
|
const userStore = useUserStore()
|
|
|
const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
|
|
|
|
|
|
defineOptions({
|
|
|
name: 'Company'
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
+const printPageRef = ref()
|
|
|
const DelType = ref(false)
|
|
|
const AddType = ref(false)
|
|
|
const gytableData = ref([])
|
|
|
@@ -2192,7 +2231,8 @@ const GetdialogSbyxgl = async () => {
|
|
|
formData.value.印件号 = response.data.印件号;
|
|
|
formData.value.工序号 = response.data.工序名称.substring(0,2);
|
|
|
formData.value.工序名称 = response.data.工序名称;
|
|
|
- formData.value.产品名称 = response.data.产品名称;
|
|
|
+ formData.value.产品名称 = response.data.产品名称;
|
|
|
+ formData.value.班组成员 = response.data.班组成员;
|
|
|
formData.value.班组Id=response.data.班组Id
|
|
|
formData.value.machine=JTMC
|
|
|
formData.value.状态=response.data.状态
|
|
|
@@ -2228,7 +2268,156 @@ const GetdialogSbyxgl = async () => {
|
|
|
}
|
|
|
FacilityWorklist()
|
|
|
onstatus()
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const gzSelVisible = ref(false)
|
|
|
+const gz_tableData = reactive([])
|
|
|
+const gz_tableData2 = reactive([])
|
|
|
+let gz_bzbh = [];
|
|
|
+
|
|
|
+const tableCols1 = [
|
|
|
+ { label: '员工编号', prop: 'bh', width: '105' },
|
|
|
+ { label: '员工姓名', prop: '员工姓名', width: '105' },
|
|
|
+ { label: '日期', prop: 'sczl_rq', width: '120' },
|
|
|
+ { label: '计件工资', prop: '计件工资', width: '105' },
|
|
|
+ { label: '加班工资', prop: '加班工资', width: '105' },
|
|
|
+ { label: '计时时数', prop: '计时时数', width: '105' },
|
|
|
+ { label: '计时工资', prop: '计时工资', width: '135' },
|
|
|
+ { label: '日工资合计', prop: '日工资合计', width: '135' },
|
|
|
+]
|
|
|
+const tableCols2 = [
|
|
|
+ { label: '日期', prop: 'sczl_rq', width: '100' },
|
|
|
+ { label: '工单编号', prop: 'sczl_gdbh', width: '105' },
|
|
|
+ { label: '产品名称', prop: 'Gd_cpmc', width: '120' },
|
|
|
+ { label: '印件及工序', prop: 'sczl_type', width: '120' },
|
|
|
+ { label: '机台', prop: 'sczl_jtbh', width: '87' },
|
|
|
+ { label: '车头产量', prop: '班组车头产量', width: '105' },
|
|
|
+ { label: '计件产量', prop: '计件产量', width: '105' },
|
|
|
+ { label: '补产产量', prop: '补产产量', width: '105' },
|
|
|
+ { label: '核算产量', prop: '核算产量', width: '105' },
|
|
|
+ { label: '达标定额', prop: '达标定额', width: '105' },
|
|
|
+ { label: '千件工价', prop: '千件工价', width: '105' },
|
|
|
+ { label: '计件工资', prop: '个人计件工资', width: '105' },
|
|
|
+ { label: '加班工资', prop: '个人加班工资', width: '105' },
|
|
|
+ { label: '装版工时', prop: '装版工时', width: '120' },
|
|
|
+ { label: '保养工时', prop: '保养工时', width: '105' },
|
|
|
+ { label: '打样工时', prop: '打样工时', width: '105' },
|
|
|
+ { label: '异常停机', prop: '异常停机工时', width: '105' },
|
|
|
+ { label: '补产标准', prop: '补产标准', width: '120' },
|
|
|
+ { label: '分摊比例', prop: 'Rate', width: '105' },
|
|
|
+]
|
|
|
+
|
|
|
+//员工工资查询
|
|
|
+const gzSel = () =>{
|
|
|
+ if(formData.value.班组成员==undefined){
|
|
|
+ ElMessage({ type: 'warning', message: '请先选择机台' });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(formData.value.班组成员.length==0){
|
|
|
+ ElMessage({ type: 'warning', message: '未获取到员工' });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for (let index in formData.value.班组成员) {
|
|
|
+ gz_bzbh[index] = formData.value.班组成员[index]['编号']
|
|
|
+ }
|
|
|
+ gzSelVisible.value=true
|
|
|
+}
|
|
|
+// 查询
|
|
|
+const gz_ontable = (ygbh) => {
|
|
|
+ // 创建一个Date对象
|
|
|
+ var currentDate = new Date();
|
|
|
+ // 获取年份
|
|
|
+ var year = currentDate.getFullYear();
|
|
|
+ // 获取月份(注意,月份从0开始,所以需要加1)
|
|
|
+ var month = currentDate.getMonth() + 1;
|
|
|
+ if (month < 10) {
|
|
|
+ month = "0" + month;
|
|
|
+ }
|
|
|
+ var date = year+ "" +month
|
|
|
+ const response = dailysearch({date: date, search: ygbh}).then(response=>{
|
|
|
+ if (response.code === 0) {
|
|
|
+ const originalData = response.data;
|
|
|
+ const summaryData = generateSummaryData(originalData);
|
|
|
+ // 将合计数据插入到原始数据中
|
|
|
+ const combinedData = [];
|
|
|
+ originalData.forEach((item, index) => {
|
|
|
+ combinedData.push(item);
|
|
|
+ const nextItem = originalData[index + 1];
|
|
|
+ if (nextItem==undefined) {
|
|
|
+ // 如果下一个员工姓名与当前不同,插入合计数据
|
|
|
+ const currentSummary = summaryData.shift();
|
|
|
+ combinedData.push(currentSummary);
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 更新表格数据
|
|
|
+ gz_tableData.splice(0, gz_tableData.length, ...combinedData);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ dailygetGzByYgbh({date:date,code:ygbh}).then(response=>{
|
|
|
+ if(response.code==0){
|
|
|
+ gz_tableData2.splice(0, gz_tableData2.length, ...response.data);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+const generateSummaryData = (data) => {
|
|
|
+ const summaryData = [];
|
|
|
+ let currentName = null;
|
|
|
+ let currentSummary = null;
|
|
|
+
|
|
|
+ data.forEach((item) => {
|
|
|
+ const name = item['员工姓名'].trim(); // 获取员工姓名并去除空格
|
|
|
+ if (name !== currentName) {
|
|
|
+ // 如果员工姓名发生改变,说明需要插入合计数据
|
|
|
+ if (currentSummary) {
|
|
|
+ // 将上一个员工的合计数据插入到数组中
|
|
|
+ summaryData.push(currentSummary);
|
|
|
+ }
|
|
|
+ // 创建新的合计数据
|
|
|
+ currentSummary = {
|
|
|
+ '员工姓名': name,
|
|
|
+ '日期': 0,
|
|
|
+ '计件工资': 0,
|
|
|
+ '加班工资': 0,
|
|
|
+ '计时时数': 0,
|
|
|
+ '计时工资': 0,
|
|
|
+ '日工资合计': 0
|
|
|
+ };
|
|
|
+ currentName = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新合计数据
|
|
|
+ currentSummary['日期']++;
|
|
|
+ currentSummary['计件工资'] += parseFloat(item['计件工资']);
|
|
|
+ currentSummary['加班工资'] += parseFloat(item['加班工资']);
|
|
|
+ currentSummary['计时时数'] += parseFloat(item['计时时数']);
|
|
|
+ currentSummary['计时工资'] += parseFloat(item['计时工资']);
|
|
|
+ currentSummary['日工资合计'] += parseFloat(item['日工资合计']);
|
|
|
+ currentSummary['员工姓名']='合计('+currentSummary['日期']+'天)';
|
|
|
+ });
|
|
|
+
|
|
|
+ // 将最后一个员工的合计数据插入到数组中
|
|
|
+ if (currentSummary) {
|
|
|
+ summaryData.push(currentSummary);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将日期填充到表格中
|
|
|
+ summaryData.forEach((summary) => {
|
|
|
+ summary['计件工资'] = summary['计件工资'].toFixed(2); // 保留两位小数
|
|
|
+ summary['加班工资'] = summary['加班工资'].toFixed(2);
|
|
|
+ summary['计时时数'] = summary['计时时数'].toFixed(2);
|
|
|
+ summary['计时工资'] = summary['计时工资'].toFixed(2);
|
|
|
+ summary['日工资合计'] = summary['日工资合计'].toFixed(2);
|
|
|
+ });
|
|
|
+
|
|
|
+ return summaryData;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
|
|
|
// const getImagePath = async (machineData.状态) => {
|
|
|
// return require(`@/assets/${status}.png`);
|
|
|
@@ -2269,7 +2458,8 @@ const FacilityProduction = async () => {
|
|
|
formData.value.印件号 = response.data.印件号;
|
|
|
formData.value.工序号 = response.data.工序名称.substring(0,2);
|
|
|
formData.value.工序名称 = response.data.工序名称;
|
|
|
- formData.value.产品名称 = response.data.产品名称;
|
|
|
+ formData.value.产品名称 = response.data.产品名称;
|
|
|
+ formData.value.班组成员 = response.data.班组成员;
|
|
|
formData.value.班组Id=response.data.班组Id
|
|
|
formData.value.machine=JTMC
|
|
|
formData.value.状态=response.data.状态
|
|
|
@@ -2573,6 +2763,16 @@ const zhichengNodeClick = (node, check) => {
|
|
|
processInspectionRecordsItem()
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+
|
|
|
+//工单打印
|
|
|
+const pd_gdprintonClick = () => {
|
|
|
+ if(formData.value.工单编号==''){
|
|
|
+ ElMessage({ type: 'warning', message: '未获取到工单' });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ printPageRef.value.open(formData.value.工单编号)
|
|
|
+}
|
|
|
|
|
|
const processInspectionRecordsItem = async (value) => {
|
|
|
const response = await ProcessInspectionRecordsItem({ process: xunchaData.value.gxmc });
|