opt:更新
This commit is contained in:
@@ -69,16 +69,6 @@
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入批次"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期" prop="analyseData">
|
||||
<el-date-picker
|
||||
v-model="query.datepick"
|
||||
@@ -89,50 +79,11 @@
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <template v-for="(col,index) in cols" v-if="hideShowDialog">-->
|
||||
<!-- <el-form-item label="col.lable">-->
|
||||
<!-- <label slot="label">{{ col.lable }}:</label>-->
|
||||
<!-- <el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </template>-->
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-s-operation"
|
||||
>
|
||||
全部展开
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- slot="right"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- type="warning"-->
|
||||
<!-- icon="el-icon-upload2"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- >-->
|
||||
<!-- 导入-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- slot="right"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- icon="el-icon-view"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="hideShow"-->
|
||||
<!-- >-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-view"
|
||||
size="mini"
|
||||
@click="hideShow"
|
||||
/>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="820px">
|
||||
@@ -241,34 +192,10 @@
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="unit_name" label="单位" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="source_form_date" label="源单日期" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in formStatus">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip :formatter="status_Format" width="120" />
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column
|
||||
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
||||
label="操作"
|
||||
width="120px"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
style="display: inline"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="scope.row.is_modify === '0'"
|
||||
:disabled-dle="scope.row.is_modify === '0'"
|
||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -281,14 +208,11 @@
|
||||
import crudFormData from './formData'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import udOperation from '@crud/UD.operation.vue'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
// import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import ViewDialog from './ViewDialog.vue'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
// import UploadDialog from './UploadDialog'
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
code: null,
|
||||
@@ -314,7 +238,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'FormData',
|
||||
dicts: ['base_data', 'ST_INV_IN_TYPE', 'INANDOUT_BILL_TYPE', 'io_bill_status'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog, MaterDialog },
|
||||
components: { pagination, crudOperation, rrOperation, ViewDialog, MaterDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -324,7 +248,7 @@ export default {
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...crudFormData },
|
||||
optShow: {
|
||||
add: true,
|
||||
add: false,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
@@ -390,17 +314,6 @@ export default {
|
||||
this.query.start_time = ''
|
||||
this.query.end_time = ''
|
||||
}
|
||||
// if (this.fromTypes.length > 0) {
|
||||
// // formstruc.getHeader(this.query.form_type).then(res => {
|
||||
// // this.cols = res
|
||||
// // res.forEach(a => {
|
||||
// // this.form.form_data[a.value, '']
|
||||
// // this.$set(this.query, 'form_query', {})
|
||||
// // })
|
||||
// // })
|
||||
// // return true
|
||||
// }
|
||||
// return false
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.INANDOUT_BILL_TYPE[row.form_type]
|
||||
@@ -416,21 +329,9 @@ export default {
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.unit_id = row.base_unit_id
|
||||
},
|
||||
// getFromTypes() {
|
||||
// crudFormData.getParentFormTypes().then((res) => { // 获取分类名称,查询根据分类编码查找对应分支树
|
||||
// this.fromTypes = res
|
||||
// if (this.fromTypes.length > 0) {
|
||||
// this.$set(this.query, 'form_type', this.fromTypes[0].value)
|
||||
// this.crud.toQuery()
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// hideShow() {
|
||||
// if (this.hideShowDialog) {
|
||||
// // this.$set(this.query, 'form_query', {})
|
||||
// }
|
||||
// this.hideShowDialog = !this.hideShowDialog
|
||||
// },
|
||||
status_Format(row, column) {
|
||||
return this.dict.label.io_bill_status[row.status]
|
||||
},
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.viewDialog.setForm(row)
|
||||
|
||||
@@ -171,14 +171,15 @@ export default {
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
form_type: '1001'
|
||||
form_type: '1001',
|
||||
is_finish: '0'
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rows : [],
|
||||
rows: [],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,15 +130,15 @@
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_code" label="载具号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="qty" label="数量" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="qty_unit_name" label="计量单位名称" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="ext_code" label="源单号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="ext_type" label="源单类型" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
|
||||
<el-table-column type="index" label="序号" min-width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="storagevehicle_code" label="载具号" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="170" prop="plan_qty" label="数量" />
|
||||
<el-table-column show-overflow-tooltip min-width="170" prop="qty_unit_name" label="计量单位名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="source_bill_code" label="源单号" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="source_bill_type" label="源单类型" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" min-width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -157,7 +157,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import AddDtl from '@/views/wms/st/inbill/AddDtl'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
@@ -234,12 +233,8 @@ export default {
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取入库单明细
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
debugger
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToAdd]() {
|
||||
@@ -251,11 +246,6 @@ export default {
|
||||
this.mater_btn = true
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_code" label="载具编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="qty" label="数量" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="plan_qty" label="数量" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="qty_unit_name" label="计量单位名称" />
|
||||
<el-table-column prop="ext_code" label="来源单号" :min-width="flexWidth('ext_code',crud.data,'来源单号')" />
|
||||
<el-table-column prop="ext_type" label="来源单据类型" :min-width="flexWidth('ext_type',crud.data,'来源单据类型')" />
|
||||
<el-table-column prop="source_bill_code" label="来源单号" :min-width="flexWidth('source_bill_code',crud.data,'来源单号')" />
|
||||
<el-table-column prop="source_bill_type" label="来源单据类型" :min-width="flexWidth('source_bill_type',crud.data,'来源单据类型')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
show-overflow-tooltip
|
||||
prop="plan_qty"
|
||||
:formatter="crud.formatNum3"
|
||||
label="重量"
|
||||
label="数量"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||
|
||||
@@ -141,13 +141,13 @@
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="190" align="center" />
|
||||
<el-table-column type="index" label="序号" min-width="50" align="center" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="190" align="center" />
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="plan_qty" label="数量" width="150" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="plan_qty" label="数量" min-width="150" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" min-width="150" align="center" />
|
||||
<el-table-column prop="source_bill_code" label="用料清单号" :min-width="flexWidth('source_bill_code',crud.data,'用料清单号')" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" min-width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
|
||||
</template>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<span class="role-span">出库明细</span>
|
||||
<div class="crud-opts-form">
|
||||
<el-form ref="form" :inline="true" :model="form" size="mini">
|
||||
<el-form-item label="库区" prop="gender2">
|
||||
<el-form-item label="分配库区" prop="gender2">
|
||||
<el-cascader
|
||||
placeholder="请选择"
|
||||
:options="sects"
|
||||
@@ -220,11 +220,6 @@
|
||||
<el-table-column show-overflow-tooltip prop="insert_time" width="150px" label="入库时间" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" width="150px" label="任务号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" width="150px" label="出库点" align="center" />
|
||||
<el-table-column align="center" label="操作" width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button :disabled="tabledisabled(scope.row)" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<StructIvt :dialog-show.sync="structshow" :stor-id="storId" :open-array="openParam" :rowmst="openRow" @StructIvtClosed="queryTableDtl2" />
|
||||
@@ -365,11 +360,6 @@ export default {
|
||||
return true
|
||||
}
|
||||
},
|
||||
deleteRow(row) {
|
||||
checkoutbill.oneCancel(row).then(res => {
|
||||
this.queryTableDtl()
|
||||
})
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.currentRow = current
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘编码" align="center" width="250px" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="可出重量" align="center" />
|
||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||
@@ -187,15 +187,15 @@ export default {
|
||||
}
|
||||
row.edit = !row.edit
|
||||
if (row.edit) {
|
||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty)
|
||||
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
|
||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.qty)
|
||||
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.qty)
|
||||
} else {
|
||||
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
|
||||
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.qty)
|
||||
// 如果待分配重量等于0则 明细重量 - 已分配重量
|
||||
if (parseInt(this.queryrow.unassign_qty) === 0) {
|
||||
this.queryrow.unassign_qty = parseFloat(this.goal_unassign_qty) - parseFloat(this.queryrow.assign_qty)
|
||||
} else {
|
||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
|
||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.qty)
|
||||
}
|
||||
if (this.queryrow.unassign_qty > this.goal_unassign_qty) {
|
||||
this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty))
|
||||
|
||||
Reference in New Issue
Block a user