This commit is contained in:
张江玮
2023-09-17 16:51:33 +08:00
parent bf5401fcc0
commit 7171a80f65
35 changed files with 724 additions and 795 deletions

View File

@@ -111,4 +111,20 @@ export function synchronize(data) {
})
}
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl, getMaterial, synchronize }
export function hlPause(data) {
return request({
url: 'api/workorder/hlPause',
method: 'post',
data
})
}
export function hlFinish(data) {
return request({
url: 'api/workorder/hlFinish',
method: 'post',
data
})
}
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl, getMaterial, synchronize, hlPause, hlFinish }

View File

@@ -201,7 +201,7 @@ export default {
cruds() {
return CRUD({
title: '物料',
optShow: { add: true, reset: true },
optShow: { add: false, reset: true },
url: 'api/Materialbase',
idField: 'material_id',
sort: 'material_id,desc',

View File

@@ -192,20 +192,14 @@
<el-row>
<el-col :span="12">
<el-form-item label="规格" prop="gg">
<el-input v-model="form.gg" style="width: 300px"><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>千克</i></el-input>
<el-input v-model="form.gg" style="width: 300px" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="客户" prop="kh">
<el-input v-model="form.kh" style="width: 300px"><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>千克</i></el-input>
<el-input v-model="form.kh" style="width: 300px" />
</el-form-item>
</el-col>
</el-row>
@@ -338,34 +332,29 @@
<el-form ref="form" :model="orderData" :rules="rules" size="mini" label-width="160px" label-suffix="">
<el-row>
<el-col :span="12">
<el-form-item label="实际数量" prop="material_id">
<el-form-item label="完成数量" prop="qty">
<el-input-number
v-model="orderData.qty"
style="width: 150px"
:min="0"
/>
><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>块</i></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="合格数" prop="qualified_qty">
<el-form-item label="完成重" prop="weight">
<el-input-number
v-model="orderData.qualified_qty"
v-model="orderData.weight"
style="width: 150px"
:min="0"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="不合格数量" prop="unqualified_qty">
<el-input-number
v-model="orderData.unqualified_qty"
style="width: 150px"
:min="0"
/>
><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>千克</i></el-input-number>
</el-form-item>
</el-col>
</el-row>

View File

@@ -86,16 +86,27 @@
>
开工
</el-button>
<el-button
slot="right"
class="filter-item"
type="warning"
icon="el-icon-position"
size="mini"
:disabled="!(crud.selections[0]) || crud.selections[1]"
@click="hlPause(crud.selections[0])"
>
暂停
</el-button>
<el-button
slot="right"
class="filter-item"
type="danger"
icon="el-icon-position"
size="mini"
:disabled="crud.selections.length !== 1"
@click="forceFinish(crud.selections[0])"
:disabled="!(crud.selections[0]) || crud.selections[1]"
@click="hlFinish(crud.selections[0])"
>
强制完成
完成
</el-button>
</crudOperation>
<!--表单组件-->
@@ -258,31 +269,6 @@
<DeviceDialog :dialog-show.sync="deviceShow" :is-single="true" @tableChanged="tableChanged" />
<MaterDtl :dialog-show.sync="materialShow" :is-single="true" @setMaterValue="setMaterValue" />
<ViewDialog ref="child3" />
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
:visible.sync="finishShow"
title="强制完成"
width="600px"
>
<el-form ref="form" :model="orderData" :rules="rules" size="mini" label-width="160px" label-suffix="">
<el-row>
<el-col :span="12">
<el-form-item label="实际重量" prop="material_id">
<el-input-number
v-model="orderData.qty"
style="width: 150px"
:min="0"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="info" @click="cancelFinish">取消</el-button>
<el-button type="primary" @click="toForceFinish">确认</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -358,7 +344,7 @@ export default {
return CRUD({
title: '工单', url: 'api/workorder', idField: 'workorder_id', sort: 'workorder_id,desc',
optShow: {
add: true,
add: false,
edit: false,
del: false,
download: false,
@@ -472,7 +458,7 @@ export default {
// 下发
submits(row) {
crudWorkorder.submits({ workorder_id: row.workorder_id }).then(res => {
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
@@ -484,6 +470,18 @@ export default {
}).catch(() => {
this.fullscreenLoading = false
})
},
hlPause(row) {
crudWorkorder.hlPause({ workorder_id: row.workorder_id }).then(res => {
this.crud.notify('暂停成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
hlFinish(row) {
crudWorkorder.hlFinish({ workorder_id: row.workorder_id }).then(res => {
this.crud.notify('完成成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
}
}
}

View File

@@ -168,20 +168,14 @@
<el-row>
<el-col :span="12">
<el-form-item label="规格" prop="gg">
<el-input v-model="form.gg" style="width: 300px"><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>千克</i></el-input>
<el-input v-model="form.gg" style="width: 300px" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="客户" prop="kh">
<el-input v-model="form.kh" style="width: 300px"><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>千克</i></el-input>
<el-input v-model="form.kh" style="width: 300px" />
</el-form-item>
</el-col>
</el-row>
@@ -326,12 +320,15 @@
<el-form ref="form" :model="orderData" :rules="rules" size="mini" label-width="160px" label-suffix="">
<el-row>
<el-col :span="12">
<el-form-item label="实际数量" prop="material_id">
<el-form-item label="完成数量" prop="qty">
<el-input-number
v-model="orderData.qty"
style="width: 150px"
:min="0"
/>
><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>块</i></el-input-number>
</el-form-item>
</el-col>
</el-row>
@@ -342,7 +339,10 @@
v-model="orderData.qualified_qty"
style="width: 150px"
:min="0"
/>
><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>块</i></el-input-number>
</el-form-item>
</el-col>
</el-row>
@@ -353,7 +353,24 @@
v-model="orderData.unqualified_qty"
style="width: 150px"
:min="0"
/>
><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>块</i></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="完成重量" prop="weight">
<el-input-number
v-model="orderData.weight"
style="width: 150px"
:min="0"
><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
>千克</i></el-input-number>
</el-form-item>
</el-col>
</el-row>
@@ -438,7 +455,7 @@ export default {
return CRUD({
title: '工单', url: 'api/workorder', idField: 'workorder_id', sort: 'workorder_id,desc',
optShow: {
add: true,
add: false,
edit: false,
del: false,
download: false,