This commit is contained in:
parent
db25f262fa
commit
260c70879c
|
|
@ -4,7 +4,7 @@
|
|||
<template>
|
||||
<vxe-input class="edit-down-input" ref="inputx" :type="enalbedPopup ? 'search' : 'input'" v-model="textboxValue"
|
||||
:readonly="readonly" @keyup="keyupEvent" @keydown="keydownEvent" :placeholder="placeholder" @click="clickEvent"
|
||||
@suffix-click="suffixClick" @search-click="popupEvent"></vxe-input>
|
||||
@suffix-click="suffixClick" @focus="onFocus" @search-click="popupEvent"></vxe-input>
|
||||
|
||||
<div style="margin-top: 10px;" v-if="buttons && buttons.length">
|
||||
<a-icon v-for="(btn, index) in buttons" :key="index" @click="buttonClick(btn)" :type="btn.type"
|
||||
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<vxe-grid :keyboard-config="{ isArrow: true }" auto-resize height="400" ref="xgrid"
|
||||
:row-config="{ isCurrent: true, isHover: true }" :loading="loading" :pager-config="tablePage" :data="tableData"
|
||||
:columns="tableColumn"
|
||||
:treeConfig="treeConfig"
|
||||
@cell-click="selectEvent" @page-change="pageChangeEvent">
|
||||
:columns="tableColumn" :treeConfig="treeConfig" @cell-click="selectEvent" @page-change="pageChangeEvent">
|
||||
</vxe-grid>
|
||||
|
||||
</template>
|
||||
|
|
@ -51,14 +49,14 @@ export default {
|
|||
props: { // 组件属性
|
||||
readonly: Boolean,
|
||||
params: Object,
|
||||
value: [Array, String,Object]
|
||||
value: [Array, String, Object]
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actions: { // api地址
|
||||
getList: `${BASE_URL}/api/web/listdata` // 获取列表数据
|
||||
},
|
||||
actionParams:null,
|
||||
actionParams: null,
|
||||
buttons: [],
|
||||
modalVisible: false, // 弹出框显示
|
||||
lastKey: '', // 上次输入的值
|
||||
|
|
@ -79,7 +77,7 @@ export default {
|
|||
{ field: 'name', title: '名称' }, // 字段名称,字段标题
|
||||
{ field: 'code', title: '编码' } // 字段名称,字段标题
|
||||
],
|
||||
treeConfig:null,
|
||||
treeConfig: null,
|
||||
modalWidth: 800, // 弹出框宽度
|
||||
modalHeight: 600, // 弹出框高度
|
||||
searchFieldNames: ['name'], // 搜索字段
|
||||
|
|
@ -98,9 +96,9 @@ export default {
|
|||
if (params.autoFocus) {
|
||||
this.$nextTick(() => {
|
||||
|
||||
setTimeout(()=>{
|
||||
this.$refs.inputx.focus();
|
||||
},100)
|
||||
setTimeout(() => {
|
||||
this.$refs.inputx.focus();
|
||||
}, 100)
|
||||
|
||||
});
|
||||
}
|
||||
|
|
@ -160,7 +158,7 @@ export default {
|
|||
if (params.columns) { // 如果列存在
|
||||
this.tableColumn = params.columns; // 表格列
|
||||
}
|
||||
if(params.treeConfig){
|
||||
if (params.treeConfig) {
|
||||
this.treeConfig = params.treeConfig;
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +170,7 @@ export default {
|
|||
if (params.dataUrl) {
|
||||
this.actions.getList = params.dataUrl;
|
||||
}
|
||||
if(params.actionParams){
|
||||
if (params.actionParams) {
|
||||
this.actionParams = params.actionParams;
|
||||
}
|
||||
}
|
||||
|
|
@ -198,10 +196,10 @@ export default {
|
|||
|
||||
let f = params.listdataFieldName || "Records";
|
||||
this.getData().then(data => {
|
||||
if('Total' in data){
|
||||
this.tablePage.total = data.Total ;
|
||||
}else{
|
||||
this.tablePage.total = data.total ;
|
||||
if ('Total' in data) {
|
||||
this.tablePage.total = data.Total;
|
||||
} else {
|
||||
this.tablePage.total = data.total;
|
||||
}
|
||||
|
||||
this.tableData = data[f];
|
||||
|
|
@ -209,15 +207,14 @@ export default {
|
|||
},
|
||||
|
||||
getData(key) { // 获取数据
|
||||
|
||||
var params = Object.assign({},this.actionParams ||{}) // 定义请求参数
|
||||
var params = Object.assign({}, this.params.actionParams || {}) // 定义请求参数
|
||||
|
||||
|
||||
params.page = this.tablePage.currentPage; // 当前页码
|
||||
params.limit = this.tablePage.pageSize; // 每页条数
|
||||
params.order_bys = []; // 排序信息
|
||||
params.search_rules = []; // 搜索信息
|
||||
if(key){
|
||||
params.order_bys = params.order_bys || []; // 排序信息
|
||||
params.search_rules = params.search_rules || []; // 搜索信息
|
||||
if (key) {
|
||||
key = this.$mk.trim(key);
|
||||
}
|
||||
if (key) {
|
||||
|
|
@ -233,7 +230,7 @@ export default {
|
|||
|
||||
return this.$mk.getPagedData({
|
||||
url: this.actions.getList,
|
||||
useBigInt:true,
|
||||
useBigInt: true,
|
||||
data: params
|
||||
});
|
||||
},
|
||||
|
|
@ -259,9 +256,9 @@ export default {
|
|||
this.scanEntry = '';
|
||||
|
||||
}, 10);
|
||||
if(params.scan){
|
||||
if (params.scan) {
|
||||
console.log(inputValue)
|
||||
params.scan({value:inputValue,input:input})
|
||||
params.scan({ value: inputValue, input: input })
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -271,7 +268,7 @@ export default {
|
|||
keydownEvent(e) {
|
||||
|
||||
const { params } = this
|
||||
if(params.scan){
|
||||
if (params.scan) {
|
||||
this.handleScanInput(e.$event);
|
||||
}
|
||||
},
|
||||
|
|
@ -336,17 +333,39 @@ export default {
|
|||
let f = params.listdataFieldName || "Records";
|
||||
this.getData(cellValue).then(data => {
|
||||
this.loading = false
|
||||
if('Total' in data){
|
||||
this.tablePage.total = data.Total ;
|
||||
}else{
|
||||
this.tablePage.total = data.total ;
|
||||
if ('Total' in data) {
|
||||
this.tablePage.total = data.Total;
|
||||
} else {
|
||||
this.tablePage.total = data.total;
|
||||
}
|
||||
this.tableData = data[f];
|
||||
})
|
||||
},
|
||||
onFocus(){
|
||||
const { params } = this
|
||||
console.log(params)
|
||||
if (params.focusToLoad) {
|
||||
const cellValue = this.textboxValue;
|
||||
let f = params.listdataFieldName || "Records";
|
||||
this.loading = true
|
||||
this.getData(cellValue).then(data => {
|
||||
|
||||
this.loading = false
|
||||
if ('Total' in data) {
|
||||
this.tablePage.total = data.Total;
|
||||
} else {
|
||||
this.tablePage.total = data.total;
|
||||
}
|
||||
this.tableData = data[f];
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
suffixClick() { // 后缀点击事件
|
||||
|
||||
this.$refs.xDown.togglePanel()
|
||||
this.$refs.xDown.togglePanel();
|
||||
|
||||
|
||||
},
|
||||
pageChangeEvent({ currentPage, pageSize }) { // 分页改变事件
|
||||
this.tablePage.currentPage = currentPage
|
||||
|
|
@ -357,10 +376,10 @@ export default {
|
|||
this.getData(this.lastKey).then(data => {
|
||||
|
||||
this.loading = false
|
||||
if('Total' in data){
|
||||
this.tablePage.total = data.Total ;
|
||||
}else{
|
||||
this.tablePage.total = data.total ;
|
||||
if ('Total' in data) {
|
||||
this.tablePage.total = data.Total;
|
||||
} else {
|
||||
this.tablePage.total = data.total;
|
||||
}
|
||||
this.tableData = data[f];
|
||||
})
|
||||
|
|
@ -377,7 +396,7 @@ export default {
|
|||
}
|
||||
|
||||
else if (params.dataType == 'mapper') {
|
||||
if(params.showField){
|
||||
if (params.showField) {
|
||||
this.$emit('input', e.row[params.showField]);
|
||||
}
|
||||
}
|
||||
|
|
@ -409,7 +428,7 @@ export default {
|
|||
this.$emit('input', selectedRow);
|
||||
}
|
||||
else if (params.dataType == 'mapper') {
|
||||
if(params.showField){
|
||||
if (params.showField) {
|
||||
this.$emit('input', selectedRow[params.showField]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ VXETable.formats.mixin({
|
|||
},
|
||||
formatDateTime({ cellValue }) { // 日期时间格式化
|
||||
|
||||
if(!cellValue){
|
||||
if (!cellValue) {
|
||||
return '';
|
||||
}
|
||||
if (typeof (cellValue) == "number") {
|
||||
|
|
@ -114,7 +114,7 @@ VXETable.formats.mixin({
|
|||
return XEUtils.toDateString(cellValue, 'yyyy-MM-dd HH:mm:ss')
|
||||
},
|
||||
formatDate({ cellValue }) { // 日期格式化
|
||||
if(!cellValue){
|
||||
if (!cellValue) {
|
||||
return '';
|
||||
}
|
||||
if (typeof (cellValue) == "number") {
|
||||
|
|
@ -133,10 +133,14 @@ VXETable.formats.mixin({
|
|||
},
|
||||
formatEnum({ cellValue, column }) { // 格式化状态
|
||||
if (cellValue == null) return '';
|
||||
if (!column.params) return '';
|
||||
for (let i = 0; i < column.params.length; i++) {
|
||||
if (column.params[i].value == cellValue) {
|
||||
return '' + column.params[i].label + '';
|
||||
let params = column.params;
|
||||
if (params && params.data) {
|
||||
params = params.data;
|
||||
}
|
||||
if (!params) return '';
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
if (params[i].value == cellValue) {
|
||||
return '' + params[i].label + '';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
|
|
@ -154,8 +158,8 @@ VXETable.renderer.add('enum', {
|
|||
let cellValue = row[column.field];
|
||||
for (let i = 0; column.params && i < column.params.data.length; i++) {
|
||||
if (column.params.data[i].value == cellValue) {
|
||||
let cls = column.params.cls + ' ' + column.params.cls +'_'+column.params.data[i].value;
|
||||
return <span class={ cls }>{column.params.data[i].label}</span>;
|
||||
let cls = column.params.cls + ' ' + column.params.cls + '_' + column.params.data[i].value;
|
||||
return <span class={cls}>{column.params.data[i].label}</span>;
|
||||
}
|
||||
}
|
||||
return <span></span>;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,316 @@
|
|||
<template>
|
||||
<div class="page-body">
|
||||
|
||||
<!-- 搜索区 -->
|
||||
<vxe-form :data="searchFormData" :items="searchFormItems" titleColon @submit="onSearch">
|
||||
</vxe-form>
|
||||
|
||||
<!-- 表格区 -->
|
||||
<vxe-grid ref='xGrid' v-bind="gridOptions" @current-change="onSelectRow"></vxe-grid>
|
||||
|
||||
<vxe-table :row-config="{isCurrent:true}" border show-overflow keep-source ref="xTable" :height="table1Height" :data="detailsData">
|
||||
|
||||
<vxe-column field="mold_scheme" title="模型" width="160" :params="editor_scheme" formatter="formatRef" ></vxe-column>
|
||||
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type"
|
||||
formatter='formatEnum' ></vxe-column>
|
||||
|
||||
<vxe-column field="mold_master_user_detail" title="师傅" width="160" :params="editor_staff" formatter="formatRef" ></vxe-column>
|
||||
|
||||
<vxe-column field="manufacture_cycle" title="制作周期" width="160" formatter="formatDate" ></vxe-column>
|
||||
<vxe-column field="draw_start_time" title="预计开始画图时间" width="160" formatter="formatDate"
|
||||
></vxe-column>
|
||||
<vxe-column field="split_design_time" title="分模设计时间预计" width="160" formatter="formatDate"
|
||||
></vxe-column>
|
||||
<vxe-column field="draw_time" title="出图时间预计" width="160" formatter="formatDate"
|
||||
></vxe-column>
|
||||
<vxe-column field="draw2D_time" title="出2D时间预计" width="160" formatter="formatDate"
|
||||
></vxe-column>
|
||||
<vxe-column field="draw3D_time" title="出3D时间预计" width="160" formatter="formatDate"
|
||||
></vxe-column>
|
||||
<vxe-column field="horizontal_frame_time" title="横架到厂日期预计" width="160" formatter="formatDate"
|
||||
></vxe-column>
|
||||
<vxe-column field="inlay_deep_hole_time" title="镶件深孔钻到厂日期预计" width="160" formatter="formatDate"
|
||||
></vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
import { toDateString } from 'xe-utils'
|
||||
|
||||
export default {
|
||||
i18n: require('./i18n'),
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
|
||||
options_production_type:[{value:'1',label:'正常布产'},{value:'2',label:'委托布产'}],
|
||||
keyName: 'ID',
|
||||
tabKey: '1',
|
||||
actions: {
|
||||
getList: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/list`
|
||||
},
|
||||
detailDataFieldName: "mold_order",
|
||||
currentRowId: 0,
|
||||
|
||||
start_time: 0,
|
||||
end_time: 0,
|
||||
|
||||
table1Height: 300,
|
||||
downHeight: 0,
|
||||
|
||||
detailsData:[],
|
||||
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
code: '',
|
||||
},
|
||||
searchRules: [
|
||||
{ key: "code", mode: "like" },
|
||||
],
|
||||
|
||||
|
||||
searchFormItems: [
|
||||
{ field: 'code', title: '订单号', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入订单号' } } },
|
||||
|
||||
|
||||
{ span: 4, itemRender: { name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, { props: { type: 'reset', content: '重置' } }] } }
|
||||
],
|
||||
|
||||
|
||||
//数据区
|
||||
gridOptions: {
|
||||
height: 600,
|
||||
id: 'datagrid_1',
|
||||
rowConfig: {
|
||||
isCurrent: true
|
||||
},
|
||||
checkboxConfig: {
|
||||
|
||||
},
|
||||
radioConfig: {
|
||||
},
|
||||
|
||||
proxyConfig: {
|
||||
sort: true, // 启用排序代理,当点击排序时会自动触发 query 行为
|
||||
filter: true, // 启用筛选代理,当点击筛选时会自动触发 query 行为
|
||||
props: {
|
||||
result: 'MoldOrder', // 配置响应结果列表字段
|
||||
total: 'total' // 配置响应结果总页数字段
|
||||
},
|
||||
// 接收Promise
|
||||
ajax: {
|
||||
// 当点击工具栏查询按钮或者手动提交指令 query或reload 时会被触发
|
||||
query: (options) => {
|
||||
const { page, sorts } = options; // 获取当前页码、每页条数、排序信息
|
||||
var params = {}; // 定义请求参数
|
||||
params.page = page.currentPage; // 当前页码
|
||||
params.limit = page.pageSize; // 每页条数
|
||||
params.order_bys = []; // 排序信息
|
||||
params.search_rules = this.getSearchParms(); // 搜索信息
|
||||
if (sorts) { // 如果有排序信息
|
||||
sorts.forEach((v) => { // 遍历排序信息
|
||||
params.order_bys.push({ // 添加排序信息
|
||||
column: v.property, // 字段名
|
||||
order: v.order // 排序方式
|
||||
})
|
||||
});
|
||||
}
|
||||
return this.loadData({ params }); // 返回请求结果
|
||||
}
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
//{ type: 'radio', width: 80 },
|
||||
{ field: 'code', title: '订单编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入订单编码' } } },
|
||||
{ field: 'name', title: '客户名称', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入客户名称' } } },
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
editor_scheme: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldScheme',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mold_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/list`
|
||||
},
|
||||
editor_staff: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesStaff',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mold_master_uid" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions);
|
||||
|
||||
return pageData;
|
||||
},
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('pageDesc')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.heightInit();
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
heightInit() {
|
||||
this.$nextTick(() => {
|
||||
|
||||
this.gridOptions.height = (this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xGrid.$el) - 150) * 0.5;
|
||||
|
||||
this.table1Height = this.gridOptions.height - 20;
|
||||
|
||||
});
|
||||
},
|
||||
getConfirmData() {
|
||||
return this.getSelectdRow();
|
||||
},
|
||||
|
||||
onSelectRow({ row }) {
|
||||
|
||||
this.currentRowId = row.id;
|
||||
|
||||
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/detail`,
|
||||
loading: "加载中...",
|
||||
data: { id: this.$mk.toBigInt(this.currentRowId) },
|
||||
useBigInt: true
|
||||
}).then(a => {
|
||||
|
||||
|
||||
|
||||
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].order_molds || []));
|
||||
|
||||
console.log(this.detailsData)
|
||||
|
||||
});
|
||||
},
|
||||
onDateChange(date) {
|
||||
|
||||
if (date && date.length) {
|
||||
this.start_time = toDateString(date[0]._d, 'yyyy/MM/dd') + ' 00:00';
|
||||
this.end_time = toDateString(date[1]._d, 'yyyy/MM/dd') + ' 23:59:59';
|
||||
} else {
|
||||
this.start_time = null;
|
||||
this.end_time = null;
|
||||
}
|
||||
|
||||
},
|
||||
getSearchParms() {
|
||||
var rules = []; // 定义搜索参数
|
||||
let findMode = k => { // 查找搜索模式
|
||||
for (let i in this.searchRules) { // 遍历搜索规则
|
||||
if (this.searchRules[i].key == k) return this.searchRules[i].mode; // 如果找到了就返回搜索模式
|
||||
}
|
||||
return "="; // 如果没有找到就返回等于
|
||||
};
|
||||
|
||||
for (let key in this.searchFormData) { // 遍历搜索表单数据
|
||||
let value = this.searchFormData[key]; // 获取值
|
||||
if (value) { // 如果有值
|
||||
let mode = findMode(key); // 获取搜索模式
|
||||
if (mode == "like") { // 如果是模糊搜索
|
||||
value = "%" + value + "%"; // 如果是模糊搜索就在两边加上%
|
||||
}
|
||||
if (typeof (value) == "object" && value.id) {
|
||||
value = value.id;
|
||||
}
|
||||
rules.push({ // 添加搜索参数
|
||||
column: key, // 字段名
|
||||
mode: mode, // 搜索模式
|
||||
value: value // 值
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return rules; // 返回搜索参数
|
||||
},
|
||||
getSelectdRow() {
|
||||
let row2 = this.$refs.xTable.getCurrentRecord();
|
||||
let row1 = this.$refs.xGrid.getCurrentRecord();
|
||||
|
||||
return {row1,row2};
|
||||
},
|
||||
loadData({ params }) {
|
||||
|
||||
params.start_time = this.start_time; // 开始时间
|
||||
params.end_time = this.end_time; // 结束时间
|
||||
return this.$mk.getPagedData({
|
||||
url: this.actions.getList,
|
||||
data: params
|
||||
});
|
||||
},
|
||||
|
||||
//add / log / setting
|
||||
toolbarClick(e) {
|
||||
if (e.name == "add") {
|
||||
/*
|
||||
this.$mk.dialog.open({
|
||||
page: addPage,
|
||||
title: "新增编号信息",
|
||||
pageMode: "add",
|
||||
dataId: 0,
|
||||
callback: ({ success }) => {
|
||||
success && this.$refs.xGrid.commitProxy('query')
|
||||
}
|
||||
})
|
||||
*/
|
||||
|
||||
this.$openPage('/tCode/tAttributeEdit')
|
||||
}
|
||||
else if (e.name == "delete") {
|
||||
this.pageDelete();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onSearch() {
|
||||
this.$refs.xGrid.commitProxy('query')
|
||||
}
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.page-body {
|
||||
padding: 10px 10px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.gridPanel {
|
||||
height: calc(100vh - 300px);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,6 +1,28 @@
|
|||
<template>
|
||||
<div class="page-body">
|
||||
|
||||
<div class="voucher-toolbar">
|
||||
<div class="voucher-toolbar-left">
|
||||
|
||||
<a-dropdown >
|
||||
<a-menu slot="overlay" @click="handleMenuClick">
|
||||
<a-menu-item key="order">
|
||||
订单
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
<a-button> 选单
|
||||
<a-icon type="down" />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<a-button type="primary" @click="ok" >保存</a-button>
|
||||
|
||||
|
||||
|
||||
<a-button @click="back" >关闭</a-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||
</vxe-form>
|
||||
|
|
@ -27,11 +49,11 @@
|
|||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
<vxe-column field="component_num" title="部件数量" width="160"
|
||||
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
||||
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type"
|
||||
<vxe-column field="production_type" title="布产类型" width="160" :params="{data:options_production_type}"
|
||||
formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_production_type } }"></vxe-column>
|
||||
|
||||
<vxe-column field="process_uid" title="加工人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
<vxe-column field="process_info" title="加工人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
|
|
@ -40,7 +62,7 @@
|
|||
<vxe-column field="plan_complete_time" title="计划完成日期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="options_is_send" formatter='formatEnum'
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="{data:options_is_send}" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_send } }"></vxe-column>
|
||||
|
||||
<vxe-column field="send_time" title="发料时间" width="160" formatter="formatDate"
|
||||
|
|
@ -50,19 +72,20 @@
|
|||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="options_is_complete" formatter='formatEnum'
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="{data:options_is_complete}" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_complete } }"></vxe-column>
|
||||
|
||||
<vxe-column field="complete_time" title="实际完成时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="{data:options_user_type}" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="{data:options_user_type}" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
|
||||
<vxe-column field="remark" title="备注" width="160" :edit-render="{ name: '$input', props: {} }"></vxe-column>
|
||||
|
||||
</vxe-table>
|
||||
|
|
@ -94,7 +117,7 @@
|
|||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="process_uid" title="加工人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
<vxe-column field="process_info" title="加工人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
|
|
@ -104,22 +127,22 @@
|
|||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="options_is_send" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_send } }"></vxe-column>
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="options_is_send"
|
||||
formatter='formatEnum'></vxe-column>
|
||||
<vxe-column field="send_time" title="发料时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="options_is_complete" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_complete } }"></vxe-column>
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="options_is_complete"
|
||||
formatter='formatEnum'></vxe-column>
|
||||
<vxe-column field="complete_time" title="实际完成时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="options_user_type"
|
||||
formatter='formatEnum'></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="options_user_type"
|
||||
formatter='formatEnum'></vxe-column>
|
||||
<vxe-column field="remark" title="备注" width="160" :edit-render="{ name: '$input', props: {} }"></vxe-column>
|
||||
|
||||
|
||||
|
|
@ -196,7 +219,7 @@ export default {
|
|||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
production_type:"1"
|
||||
production_type: "1"
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 150,
|
||||
|
|
@ -205,99 +228,47 @@ export default {
|
|||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
|
||||
order_code: [
|
||||
{ required: true, message: '请输入订单编号' }
|
||||
code: [
|
||||
{ required: true, message: '请输入编号' }
|
||||
],
|
||||
mold_order: [
|
||||
{ required: true, message: '请选择订单' }
|
||||
],
|
||||
mold_scheme: [
|
||||
{ required: true, message: '请选择模具' }
|
||||
],
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
|
||||
|
||||
{
|
||||
title: '选择订单', span: 8,
|
||||
title: '订单', span: 8,
|
||||
field: 'mold_order',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "order_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
name: 'MkFormInputShow', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldOrder',
|
||||
onDataChanged: ({ data }) => {
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/detail`,
|
||||
loading: "加载中...",
|
||||
data: { id: data.id },
|
||||
useBigInt: true
|
||||
}).then(a => {
|
||||
|
||||
let d = a.data.mold_order;
|
||||
let detail = d.order_molds ? d.order_molds[0] : null;
|
||||
|
||||
console.log(detail)
|
||||
if (detail) {
|
||||
this.formOptions.data.mold_scheme = detail.mold_scheme;
|
||||
this.formOptions.data.mold_id = detail.mold_id;
|
||||
|
||||
if(detail.draw_start_time){
|
||||
this.formOptions.data.draw_start_time = this.getDateValue(detail.draw_start_time);
|
||||
}
|
||||
|
||||
if(detail.split_design_time){
|
||||
this.formOptions.data.split_design_time = this.getDateValue(detail.split_design_time);
|
||||
}
|
||||
|
||||
if(detail.draw_time){
|
||||
this.formOptions.data.draw_time = this.getDateValue(detail.draw_time);
|
||||
}
|
||||
if(detail.draw2D_time){
|
||||
this.formOptions.data.draw2D_time = this.getDateValue(detail.draw2D_time);
|
||||
}
|
||||
if(detail.draw3D_time){
|
||||
this.formOptions.data.draw3D_time = this.getDateValue(detail.draw3D_time);
|
||||
}
|
||||
if(detail.horizontal_frame_time){
|
||||
this.formOptions.data.horizontal_frame_time = this.getDateValue(detail.horizontal_frame_time);
|
||||
}
|
||||
|
||||
this.formOptions.data = JSON.parse(JSON.stringify( this.formOptions.data))
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/list`
|
||||
textField: "name"
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
title: '模具', span: 8,
|
||||
field: 'mold_scheme',
|
||||
itemRender: {
|
||||
name: 'MkFormInputShow', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ field: 'code', title: '编号', span: 8, itemRender: { name: '$input' } },
|
||||
{
|
||||
title: '模具', span: 8,
|
||||
field: 'mold_scheme',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "mold_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldScheme',
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/list`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ field: 'production_type', title: '布产类型', span: 8, itemRender: { name: '$select', props: { options: options_production_type } } },
|
||||
|
||||
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 8, itemRender: { name: '$select', props: { options: options_production_type } } },
|
||||
|
||||
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
|
|
@ -363,7 +334,7 @@ export default {
|
|||
textField: "name",
|
||||
listdataFieldName: 'MesStaff',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mes_staff_id" }
|
||||
{ fromField: "id", field: "process_uid" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||
},
|
||||
|
|
@ -403,7 +374,7 @@ export default {
|
|||
|
||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName], rules: this.formOptions.items });
|
||||
|
||||
console.log(this.formOptions.data)
|
||||
|
||||
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component || []));
|
||||
this.detailsData2 = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component_processes || []));
|
||||
|
||||
|
|
@ -437,9 +408,64 @@ export default {
|
|||
|
||||
|
||||
getDateValue(v) {
|
||||
return new Date(v * 1000) ;
|
||||
return new Date(v * 1000);
|
||||
},
|
||||
|
||||
handleMenuClick(e) {
|
||||
let { width, height } = this.$mk.getWindowSize();
|
||||
if (e.key == 'order') {
|
||||
this.$mk.dialog.open({
|
||||
page: () => import("../MoldOrder/selector"),
|
||||
title: "选择订单",
|
||||
showFooter: true,
|
||||
width: width * 0.9,
|
||||
height: height * 0.9,
|
||||
callback: ({ data }) => {
|
||||
if (!data || !data.row2) {
|
||||
this.$mk.error("未选择明细行");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.formOptions.data.mold_order = data.row1;
|
||||
this.formOptions.data.order_id = data.row1.id;
|
||||
|
||||
let detail = data.row2;
|
||||
|
||||
console.log(detail)
|
||||
this.formOptions.data.mold_scheme = detail.mold_scheme;
|
||||
this.formOptions.data.mold_id = detail.mold_id;
|
||||
|
||||
|
||||
if (detail.draw_start_time) {
|
||||
this.formOptions.data.draw_start_time = this.getDateValue(detail.draw_start_time);
|
||||
}
|
||||
|
||||
if (detail.split_design_time) {
|
||||
this.formOptions.data.split_design_time = this.getDateValue(detail.split_design_time);
|
||||
}
|
||||
|
||||
if (detail.draw_time) {
|
||||
this.formOptions.data.draw_time = this.getDateValue(detail.draw_time);
|
||||
}
|
||||
if (detail.draw2D_time) {
|
||||
this.formOptions.data.draw2D_time = this.getDateValue(detail.draw2D_time);
|
||||
}
|
||||
if (detail.draw3D_time) {
|
||||
this.formOptions.data.draw3D_time = this.getDateValue(detail.draw3D_time);
|
||||
}
|
||||
if (detail.horizontal_frame_time) {
|
||||
this.formOptions.data.horizontal_frame_time = this.getDateValue(detail.horizontal_frame_time);
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.formOptions.data = JSON.parse(JSON.stringify(this.formOptions.data))
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
heightInit() {
|
||||
|
||||
this.$nextTick(() => {
|
||||
|
|
@ -460,7 +486,7 @@ export default {
|
|||
// 获取路由的id参数
|
||||
getDataId() {
|
||||
let dataId = this.dataId;
|
||||
if (this.$route.params.id) {
|
||||
if (this.$route && this.$route.params && this.$route.params.id) {
|
||||
dataId = this.$route.params.id;
|
||||
}
|
||||
if (!dataId) {
|
||||
|
|
@ -510,6 +536,13 @@ export default {
|
|||
// 格式化提交的数据
|
||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
||||
|
||||
if (postdata.mold_id) {
|
||||
postdata.mold_id = this.$mk.toBigInt(postdata.mold_id);
|
||||
}
|
||||
if (postdata.order_id) {
|
||||
postdata.order_id = this.$mk.toBigInt(postdata.order_id);
|
||||
}
|
||||
|
||||
postdata.mold_production_order_component = this.$mk.getPostFieldValue({
|
||||
rowFilter: (row) => { return row.id || row.component_id },
|
||||
dataId: this.getDataId_BigInt(),
|
||||
|
|
|
|||
|
|
@ -143,7 +143,13 @@ export default {
|
|||
},
|
||||
// 表单项
|
||||
items: [
|
||||
{ field: 'code', title: '模型编码', span: 12, itemRender: { name: '$input' } },
|
||||
|
||||
|
||||
{
|
||||
title: '左侧',
|
||||
span: 19,
|
||||
children: [
|
||||
{ field: 'code', title: '模型编码', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'name', title: '模型名称', span: 12, itemRender: { name: '$input' } },
|
||||
|
||||
{
|
||||
|
|
@ -165,6 +171,16 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '右侧',
|
||||
span: 5,
|
||||
children: [
|
||||
{ field: 'image', span: 12, itemRender: { name: 'MkFormUploader' } },
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,29 +3,17 @@
|
|||
<vxe-pulldown ref="pulldownRef" transfer>
|
||||
<template #default>
|
||||
<vxe-input ref="inputx" style="width:400px" v-model="searchName" suffix-icon="vxe-icon-table"
|
||||
placeholder="搜索员工,随车联,工序等信息" @keydown="keydownEvent" @suffix-click="suffixClick"></vxe-input>
|
||||
placeholder="搜索工艺布产等信息" @keydown="keydownEvent" @suffix-click="suffixClick"></vxe-input>
|
||||
<a-icon type="scan" :style="{ fontSize: '22px', color: '#08c', marginLeft: '10px' }" @click="inputFocus" />
|
||||
</template>
|
||||
<template #dropdown>
|
||||
<div class="search-dropdown">
|
||||
<div class="search-dropdown-column">
|
||||
<h3>随车联</h3>
|
||||
<h3>工艺布产</h3>
|
||||
<vxe-grid border auto-resize height="400" :row-config="{ isHover: true }" :loading="loading"
|
||||
:data="tableDataOrders" :columns="tableColumnOrders" @cell-click="cellClickEventOrders">
|
||||
</vxe-grid>
|
||||
</div>
|
||||
<div class="search-dropdown-column">
|
||||
<h3>员工</h3>
|
||||
<vxe-grid border auto-resize height="400" :row-config="{ isHover: true }" :loading="loading"
|
||||
:data="tableDataStaff" :columns="tableColumn" @cell-click="cellClickEventStaff">
|
||||
</vxe-grid>
|
||||
</div>
|
||||
<div class="search-dropdown-column">
|
||||
<h3>工序</h3>
|
||||
<vxe-grid border auto-resize height="400" :row-config="{ isHover: true }" :loading="loading"
|
||||
:data="tableDataProcesses" :columns="tableColumn" @cell-click="cellClickEventProcesses">
|
||||
</vxe-grid>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-pulldown>
|
||||
|
|
@ -34,16 +22,21 @@
|
|||
<div class="left">
|
||||
|
||||
<div class="card">
|
||||
<h4>报工信息</h4>
|
||||
<h4>工艺布产工序</h4>
|
||||
|
||||
|
||||
<div v-for="item in detailsData" :key="item">
|
||||
<div class="gx-item">
|
||||
<div class="gx-item-col">{{ item.name }}</div>
|
||||
<div class="gx-item-col">
|
||||
<a-button type="primary" @click="pageReport(item)">报工</a-button>
|
||||
</div>
|
||||
<div class="gx-item">
|
||||
<div class="gx-item-col">
|
||||
|
||||
<div>{{ item.moldname }}</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="gx-item-col">
|
||||
<a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button>
|
||||
<a-button type="primary" @click="pageReport(item)" v-if="item.is_send === 1">报工</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -59,7 +52,7 @@
|
|||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h4>料品信息</h4>
|
||||
<h4>模具信息</h4>
|
||||
|
||||
<vxe-form :data="formOptions3.data" ref="xForm" :title-width="formOptions3.titleWidth"
|
||||
:title-align="formOptions3.titleAlign" :rules="formOptions3.rules" :items="formOptions3.items" titleColon>
|
||||
|
|
@ -107,7 +100,7 @@ export default {
|
|||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
|
||||
detailsData:[{name:'工序1'},{name:'工序2'}],
|
||||
detailsData: [{moldname:'模具1' ,name: '工序1' }, { moldname:'模具2' ,name: '工序2' }],
|
||||
|
||||
formOptions2: {
|
||||
data: {
|
||||
|
|
@ -217,8 +210,9 @@ export default {
|
|||
|
||||
loading: false,
|
||||
tableColumnOrders: [
|
||||
{ field: 'production_number', title: '单号' },
|
||||
{ field: 'materials_name', title: '料品名' },
|
||||
{ field: 'code', title: '单号' },
|
||||
{ field: 'mold_name', title: '模具名' },
|
||||
{ field: 'mold_code', title: '模具编号' },
|
||||
],
|
||||
tableColumn: [
|
||||
{ field: 'name', title: '名称' },
|
||||
|
|
@ -283,12 +277,12 @@ export default {
|
|||
|
||||
this.loading = true
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/search`,
|
||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/search`,
|
||||
loading: "搜索中...",
|
||||
data: {
|
||||
"keyword": key,
|
||||
"ptyid": 0,
|
||||
"company_id": 1,
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID),
|
||||
"search_rules": [
|
||||
],
|
||||
"end_time": 0,
|
||||
|
|
@ -298,16 +292,14 @@ export default {
|
|||
],
|
||||
"limit": 0,
|
||||
"project_token": process.env.VUE_APP_APPTOKEN,
|
||||
"beid": 1,
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"page": 1,
|
||||
"start_time": 0
|
||||
},
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
this.loading = false
|
||||
this.tableDataStaff = a.data.mes_staff || [];
|
||||
this.tableDataProcesses = a.data.mes_processes || [];
|
||||
this.tableDataOrders = a.data.production_order_array || [];
|
||||
this.tableDataOrders = a.data.mold_production_order || [];
|
||||
|
||||
}).catch((a) => {
|
||||
this.loading = false
|
||||
|
|
@ -435,56 +427,25 @@ export default {
|
|||
$pulldown.hidePanel()
|
||||
}
|
||||
|
||||
let data = Object.assign({}, row);
|
||||
let data2 = Object.assign({}, row);
|
||||
let data3 = Object.assign({}, row.mold_detail);
|
||||
|
||||
|
||||
this.formOptions4.data = data
|
||||
this.formOptions2.data = data2
|
||||
this.formOptions3.data = data3
|
||||
|
||||
this.detailsData = row.mold_production_order_component_processes;
|
||||
},
|
||||
cellClickEventStaff({ row }) {
|
||||
this.selectStaff({ data: row })
|
||||
},
|
||||
|
||||
|
||||
save() {
|
||||
pageReport(item) {
|
||||
|
||||
let postdata = Object.assign({}, this.formOptions.data);
|
||||
|
||||
postdata.staff_uid = this.formOptions2.data.id;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
postdata.stage_id = this.formOptions3.data.sort_id;
|
||||
postdata.step_id = this.formOptions3.data.id;
|
||||
postdata.step_name = this.formOptions3.data.name;
|
||||
|
||||
|
||||
if (postdata.soil_date) {
|
||||
postdata.soil_date = parseInt(new Date(postdata.soil_date).getTime() / 1000); // 转换为时间戳
|
||||
} else {
|
||||
postdata.soil_date = 0
|
||||
}
|
||||
|
||||
postdata.loss_number = parseFloat(postdata.loss_number || 0)
|
||||
|
||||
if (!postdata.staff_uid) {
|
||||
this.$mk.error("请先选择员工");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!postdata.production_order_id) {
|
||||
this.$mk.error("请先选择随车联");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!postdata.step_id) {
|
||||
this.$mk.error("请先选择工序");
|
||||
return;
|
||||
}
|
||||
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/create`,
|
||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/create`,
|
||||
loading: "报工中...",
|
||||
data: {
|
||||
"ptyid": parseInt(process.env.VUE_APP_PTYID),
|
||||
|
|
@ -492,7 +453,7 @@ export default {
|
|||
"store_id": 0,
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||
"mes_reporting_create_request": postdata,
|
||||
"id": item.id,
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
|
||||
},
|
||||
useBigInt: true,
|
||||
|
|
@ -500,6 +461,37 @@ export default {
|
|||
console.log(a)
|
||||
if (a.code == 200) {
|
||||
this.$mk.success("报工成功");
|
||||
item.is_send = 1;
|
||||
|
||||
} else {
|
||||
|
||||
this.$mk.error(a.msg || a.message);
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
pageSend(item) {
|
||||
|
||||
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/sendMaterial`,
|
||||
loading: "发料中...",
|
||||
data: {
|
||||
"ptyid": parseInt(process.env.VUE_APP_PTYID),
|
||||
"project_token": process.env.VUE_APP_APPTOKEN,
|
||||
"store_id": 0,
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||
"id": item.id,
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
|
||||
},
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
console.log(a)
|
||||
if (a.code == 200) {
|
||||
this.$mk.success("发料成功");
|
||||
item.is_send = 1;
|
||||
|
||||
} else {
|
||||
|
||||
this.$mk.error(a.msg || a.message);
|
||||
|
|
@ -624,11 +616,13 @@ export default {
|
|||
font-size: 14px;
|
||||
}
|
||||
|
||||
.gx-item{
|
||||
.gx-item {
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
border-bottom: 1px dashed #d3d3d3;
|
||||
}
|
||||
.gx-item-col{
|
||||
flex:5;
|
||||
|
||||
.gx-item-col {
|
||||
flex: 5;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue