0609danweimaterialcnumber
This commit is contained in:
parent
2e5b24b370
commit
437b924667
|
@ -3,7 +3,7 @@
|
||||||
<el-form
|
<el-form
|
||||||
id="customerForm"
|
id="customerForm"
|
||||||
ref="checkForm"
|
ref="checkForm"
|
||||||
label-width="100px"
|
label-width="150px"
|
||||||
:model="checkForm"
|
:model="checkForm"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<el-form
|
<el-form
|
||||||
id="customerForm"
|
id="customerForm"
|
||||||
ref="checkForm"
|
ref="checkForm"
|
||||||
label-width="100px"
|
label-width="150px"
|
||||||
:model="checkForm"
|
:model="checkForm"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
height="100"
|
height="100"
|
||||||
v-el-height-adaptive-table="{ bottomOffset: 42 }"
|
v-el-height-adaptive-table="{ bottomOffset: 42 }"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="记录编号" prop="number"> </el-table-column>
|
<el-table-column label="记录编号" prop="number"></el-table-column>
|
||||||
<el-table-column label="操作人员">
|
<el-table-column label="操作人员">
|
||||||
<template slot-scope="scope" v-if="scope.row.create_by">
|
<template slot-scope="scope" v-if="scope.row.create_by">
|
||||||
{{ scope.row.create_by_.name }}
|
{{ scope.row.create_by_.name }}
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
<el-tag v-else>已审核</el-tag>
|
<el-tag v-else>已审核</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time"> </el-table-column>
|
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
@ -349,7 +349,9 @@
|
||||||
<el-input v-model="item.batch" placeholder="批次号"></el-input>
|
<el-input v-model="item.batch" placeholder="批次号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" style="margin-right: 10px">
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
class="expiration_date"
|
class="expiration_date"
|
||||||
label="有效期"
|
label="有效期"
|
||||||
|
@ -365,6 +367,21 @@
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-form-item label="物料编号:">
|
||||||
|
<div v-for="(ob,ind) in item.details" :key="ob.number" style="display: inline-block">
|
||||||
|
<span>{{ob.number}}</span>
|
||||||
|
<el-button
|
||||||
|
v-if="ob.number!==''"
|
||||||
|
@click="deleteItemNumber(index,ind)"
|
||||||
|
style="border: none;background: none;padding: 0;margin-top: 4px;"
|
||||||
|
>
|
||||||
|
<i class="el-icon-remove-outline" style="font-size: 20px"></i>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-input style="width: 300px;" clearable v-model="itemDetails" placeholder="物料编号,回车确定编号" @keyup.enter.native="detailEnter(itemDetails,index)"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<!-- 删除按钮 -->
|
<!-- 删除按钮 -->
|
||||||
<el-col :span="1">
|
<el-col :span="1">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
|
@ -422,7 +439,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getfifoList,
|
getfifoList,
|
||||||
createInventory,
|
createInventory,
|
||||||
createInother,
|
createInother,
|
||||||
|
@ -432,15 +449,15 @@ import {
|
||||||
deleteFifo,
|
deleteFifo,
|
||||||
audit,
|
audit,
|
||||||
outOther,
|
outOther,
|
||||||
} from "@/api/inm";
|
} from "@/api/inm";
|
||||||
import { getPuorderList } from "@/api/pum";
|
import {getPuorderList} from "@/api/pum";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { getpVendorList } from "@/api/vendor";
|
import {getpVendorList} from "@/api/vendor";
|
||||||
import { getMaterialList } from "@/api/mtm";
|
import {getMaterialList} from "@/api/mtm";
|
||||||
import { getUserList } from "@/api/user";
|
import {getUserList} from "@/api/user";
|
||||||
import { genTree } from "@/utils";
|
import {genTree} from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaulteinventory = {
|
const defaulteinventory = {
|
||||||
vendor: null,
|
vendor: null,
|
||||||
details: [
|
details: [
|
||||||
{
|
{
|
||||||
|
@ -448,19 +465,20 @@ const defaulteinventory = {
|
||||||
material: "", // 物料
|
material: "", // 物料
|
||||||
count: "", //数量
|
count: "", //数量
|
||||||
batch: "", //批次
|
batch: "", //批次
|
||||||
|
details:[],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const defaulteoutfifo = {
|
const defaulteoutfifo = {
|
||||||
details: [
|
details: [
|
||||||
{
|
{
|
||||||
material_batch: null,
|
material_batch: null,
|
||||||
count: null,
|
count: null,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: {Pagination},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
inventory: defaulteinventory,
|
inventory: defaulteinventory,
|
||||||
|
@ -469,13 +487,14 @@ export default {
|
||||||
fifoList: {
|
fifoList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
itemDetails:'',
|
||||||
types_: {
|
types_: {
|
||||||
1: "生产领料",
|
1: "生产领料",
|
||||||
2: "销售提货",
|
2: "销售提货",
|
||||||
3: "采购入库",
|
3: "采购入库",
|
||||||
4: "生产入库",
|
4: "生产入库",
|
||||||
5: "其他入库",
|
5: "其他入库",
|
||||||
6:"其他出库",
|
6: "其他出库",
|
||||||
},
|
},
|
||||||
inpur: {},
|
inpur: {},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
|
@ -492,7 +511,7 @@ export default {
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
dialogVisibles: false,
|
dialogVisibles: false,
|
||||||
rule1: {
|
rule1: {
|
||||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -506,8 +525,14 @@ export default {
|
||||||
this.getpuorderList();
|
this.getpuorderList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
detailEnter(item,index){
|
||||||
|
this.inventory.details[index].details.push({number:item});
|
||||||
|
this.itemDetails = '';
|
||||||
|
},
|
||||||
|
deleteItemNumber(index,ind){
|
||||||
|
this.inventory.details[index].details.splice(ind,1);
|
||||||
|
},
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
|
||||||
|
@ -522,13 +547,13 @@ export default {
|
||||||
handleDetail(scope) {
|
handleDetail(scope) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "fifodetail",
|
name: "fifodetail",
|
||||||
params: { id: scope.row.id, pu_order: scope.row.pu_order },
|
params: {id: scope.row.id, pu_order: scope.row.pu_order},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//供应商列表
|
//供应商列表
|
||||||
getListgys() {
|
getListgys() {
|
||||||
getpVendorList({ page: 0 }).then((response) => {
|
getpVendorList({page: 0}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.vendoroptions = response.data;
|
this.vendoroptions = response.data;
|
||||||
}
|
}
|
||||||
|
@ -536,7 +561,7 @@ export default {
|
||||||
},
|
},
|
||||||
//采购订单
|
//采购订单
|
||||||
getpuorderList() {
|
getpuorderList() {
|
||||||
getPuorderList({ page: 0 }).then((response) => {
|
getPuorderList({page: 0}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.puorderoptions = response.data;
|
this.puorderoptions = response.data;
|
||||||
}
|
}
|
||||||
|
@ -554,7 +579,7 @@ export default {
|
||||||
},
|
},
|
||||||
//仓库
|
//仓库
|
||||||
getlists() {
|
getlists() {
|
||||||
getWarehouseList({ page: 0 }).then((response) => {
|
getWarehouseList({page: 0}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.warehouseData = genTree(response.data);
|
this.warehouseData = genTree(response.data);
|
||||||
}
|
}
|
||||||
|
@ -582,6 +607,7 @@ export default {
|
||||||
material: "", // 物料
|
material: "", // 物料
|
||||||
count: "", //数量
|
count: "", //数量
|
||||||
batch: "", // 批次
|
batch: "", // 批次
|
||||||
|
details:[]
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$message("最多可添加十项条件");
|
this.$message("最多可添加十项条件");
|
||||||
|
@ -596,7 +622,7 @@ export default {
|
||||||
//物料
|
//物料
|
||||||
getmaterialList() {
|
getmaterialList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
getMaterialList({ pageoff: true }).then((response) => {
|
getMaterialList({pageoff: true}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.materialoptions = genTree(response.data);
|
this.materialoptions = genTree(response.data);
|
||||||
}
|
}
|
||||||
|
@ -612,6 +638,7 @@ export default {
|
||||||
material: "", // 物料
|
material: "", // 物料
|
||||||
count: "", //数量
|
count: "", //数量
|
||||||
batch: "", //批次
|
batch: "", //批次
|
||||||
|
details:[],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
this.inventory = Object.assign({}, defaulteinventory);
|
this.inventory = Object.assign({}, defaulteinventory);
|
||||||
|
@ -632,7 +659,7 @@ export default {
|
||||||
this.outfifo = Object.assign({}, defaulteoutfifo);
|
this.outfifo = Object.assign({}, defaulteoutfifo);
|
||||||
this.dialogVisibleout = true;
|
this.dialogVisibleout = true;
|
||||||
|
|
||||||
getmaterialbatchList({ page: 0 }).then((response) => {
|
getmaterialbatchList({page: 0}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.materialbatchoptions = response.data;
|
this.materialbatchoptions = response.data;
|
||||||
}
|
}
|
||||||
|
@ -711,9 +738,9 @@ export default {
|
||||||
handlePack(scope) {
|
handlePack(scope) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "salesdetail",
|
name: "salesdetail",
|
||||||
params: { id: scope.row.sale },
|
params: {id: scope.row.sale},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -261,8 +261,7 @@
|
||||||
}, {
|
}, {
|
||||||
value: '套',
|
value: '套',
|
||||||
label: '套'
|
label: '套'
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
value: '个',
|
value: '个',
|
||||||
label: '个'
|
label: '个'
|
||||||
}, {
|
}, {
|
||||||
|
@ -271,6 +270,24 @@
|
||||||
}, {
|
}, {
|
||||||
value: '瓶',
|
value: '瓶',
|
||||||
label: '瓶'
|
label: '瓶'
|
||||||
|
}, {
|
||||||
|
value: 'g',
|
||||||
|
label: 'g'
|
||||||
|
}, {
|
||||||
|
value: 'kg',
|
||||||
|
label: 'kg'
|
||||||
|
}, {
|
||||||
|
value: '卷',
|
||||||
|
label: '卷'
|
||||||
|
}, {
|
||||||
|
value: '张',
|
||||||
|
label: '张'
|
||||||
|
}, {
|
||||||
|
value: '支',
|
||||||
|
label: '支'
|
||||||
|
}, {
|
||||||
|
value: '袋',
|
||||||
|
label: '袋'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
|
|
|
@ -216,8 +216,7 @@
|
||||||
}, {
|
}, {
|
||||||
value: '套',
|
value: '套',
|
||||||
label: '套'
|
label: '套'
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
value: '个',
|
value: '个',
|
||||||
label: '个'
|
label: '个'
|
||||||
}, {
|
}, {
|
||||||
|
@ -226,6 +225,24 @@
|
||||||
}, {
|
}, {
|
||||||
value: '瓶',
|
value: '瓶',
|
||||||
label: '瓶'
|
label: '瓶'
|
||||||
|
}, {
|
||||||
|
value: 'g',
|
||||||
|
label: 'g'
|
||||||
|
}, {
|
||||||
|
value: 'kg',
|
||||||
|
label: 'kg'
|
||||||
|
}, {
|
||||||
|
value: '卷',
|
||||||
|
label: '卷'
|
||||||
|
}, {
|
||||||
|
value: '张',
|
||||||
|
label: '张'
|
||||||
|
}, {
|
||||||
|
value: '支',
|
||||||
|
label: '支'
|
||||||
|
}, {
|
||||||
|
value: '袋',
|
||||||
|
label: '袋'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
|
|
|
@ -245,7 +245,8 @@
|
||||||
:model="tableForm"
|
:model="tableForm"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="dialogVisibleForm"
|
:visible.sync="dialogVisibleForm"
|
||||||
:title="tableForm.name">
|
:title="tableForm.name"
|
||||||
|
>
|
||||||
<el-form
|
<el-form
|
||||||
label-width="200px"
|
label-width="200px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
|
@ -312,6 +313,13 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row style="box-sizing: border-box;padding-right: 50px">
|
||||||
|
<el-col v-for="(item,$index) in dialogFieldList" :key="$index" :span="12">
|
||||||
|
<el-form-item v-if="item.field_type==='draw'" :label="item.field_name">
|
||||||
|
<img style="width: 500px;" :src="item.draw_template" alt="tupian">
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -428,6 +436,20 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="模板图片" v-if="field.field_type === 'draw'">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
:action="upUrl"
|
||||||
|
accept="image/jpeg, image/gif, image/png, image/bmp"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:headers="upHeaders"
|
||||||
|
>
|
||||||
|
<img v-if="field.draw_template" :src="field.draw_template" class="avatar"/>
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon"/>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number v-model="field.sort" :min="1" placeholder="排序"></el-input-number>
|
<el-input-number v-model="field.sort" :min="1" placeholder="排序"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -496,6 +518,7 @@
|
||||||
field_name: '',
|
field_name: '',
|
||||||
sort: '',
|
sort: '',
|
||||||
field_choice: [""],
|
field_choice: [""],
|
||||||
|
draw_template:''
|
||||||
},
|
},
|
||||||
field_choice: [''],
|
field_choice: [''],
|
||||||
options: [],
|
options: [],
|
||||||
|
@ -585,6 +608,10 @@
|
||||||
{
|
{
|
||||||
value: 'selects',
|
value: 'selects',
|
||||||
label: '多选'
|
label: '多选'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'draw',
|
||||||
|
label: '绘图模板'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
formList:[],
|
formList:[],
|
||||||
|
@ -796,7 +823,18 @@
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
debugger;
|
||||||
|
console.log(res)
|
||||||
|
this.field.draw_template = res.data.path;
|
||||||
|
},
|
||||||
|
beforeAvatarUpload(file) {
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||||
|
}
|
||||||
|
return isLt2M;
|
||||||
},
|
},
|
||||||
//新增字段
|
//新增字段
|
||||||
handlefieldCreate() {
|
handlefieldCreate() {
|
||||||
|
|
|
@ -190,8 +190,7 @@
|
||||||
}, {
|
}, {
|
||||||
value: '套',
|
value: '套',
|
||||||
label: '套'
|
label: '套'
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
value: '个',
|
value: '个',
|
||||||
label: '个'
|
label: '个'
|
||||||
}, {
|
}, {
|
||||||
|
@ -200,6 +199,24 @@
|
||||||
}, {
|
}, {
|
||||||
value: '瓶',
|
value: '瓶',
|
||||||
label: '瓶'
|
label: '瓶'
|
||||||
|
}, {
|
||||||
|
value: 'g',
|
||||||
|
label: 'g'
|
||||||
|
}, {
|
||||||
|
value: 'kg',
|
||||||
|
label: 'kg'
|
||||||
|
}, {
|
||||||
|
value: '卷',
|
||||||
|
label: '卷'
|
||||||
|
}, {
|
||||||
|
value: '张',
|
||||||
|
label: '张'
|
||||||
|
}, {
|
||||||
|
value: '支',
|
||||||
|
label: '支'
|
||||||
|
}, {
|
||||||
|
value: '袋',
|
||||||
|
label: '袋'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
|
|
Loading…
Reference in New Issue