单据配置相关修改

yanshishuju
yewj 7 months ago
parent b30a92b8c2
commit e985790e86

@ -0,0 +1,18 @@
import axios from "@/utils/request";
export function getSet(query) {
return axios({
url: "/udiwms/ioSplit/collect/getSet",
method: "get",
params: query
});
}
export function updateSet(query) {
return axios({
url: "/udiwms/ioSplit/collect/updateSet",
method: "post",
data: query
});
}

@ -1,15 +1,28 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :model="formData" :rules="formRules" label-width="140px" ref="dataForm"> <el-form :model="formData" :rules="formRules" label-width="160px" ref="dataForm">
<el-button-group style="display: flex;margin: 0px 0 10px 90%; ">
<el-button type="primary" @click.native="save()">保存</el-button>
</el-button-group>
<el-collapse v-model="activeNames"> <el-collapse v-model="activeNames">
<el-collapse-item name="0"> <el-collapse-item name="0">
<template slot="title"> <template slot="title">
<p class="form-title">下载设置</p> <p class="form-title">原始单据下载设置</p>
</template> </template>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="11" class="el-col"> <el-col :span="8" class="el-col">
<el-form-item label="开启单据自动下载:" prop="autoDownload" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoDownload">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8" class="el-col">
<el-form-item label="起始下载时间:" prop="startDownloadTime" label-width="160px"> <el-form-item label="起始下载时间:" prop="startDownloadTime" label-width="160px">
<el-date-picker <el-date-picker
v-model="formData.startDownloadTime" v-model="formData.startDownloadTime"
@ -18,64 +31,78 @@
style="width: 90%" style="width: 90%"
:clearable="false" :clearable="false"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="save()"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-collapse-item> </el-collapse-item>
<el-collapse-item name="1"> <el-collapse-item name="1">
<template slot="title"> <template slot="title">
<p class="form-title">单据自助上传设置</p> <p class="form-title">原始单据处理设置</p>
</template> </template>
<el-row :gutter="20"> <el-row :gutter="20">
<!-- <el-col :span="11" class="el-col">--> <el-col :span="8" class="el-col">
<!-- <el-form-item label="流通计量层级单位:" prop="distributeLevelUnit" label-width="160px">--> <el-form-item label="自动转成待处理单据:" prop="autoDealOrder" style="margin-bottom: 0">
<!-- <el-input style="width: 90%" size="small" placeholder="请输入流通计量层级单位"--> <el-radio-group v-model="formData.autoDealOrder">
<!-- disabled--> <el-radio :label="true"></el-radio>
<!-- v-model="newProductData.distributeLevelUnit"--> <el-radio :label="false"></el-radio>
<!-- ></el-input>--> </el-radio-group>
<!-- </el-form-item>--> </el-form-item>
<!-- </el-col>--> </el-col>
<!-- <el-col :span="11" class="el-col">--> </el-row>
<!-- <el-form-item label="使用计量层级单位:" prop="useLevelUnit" label-width="160px">--> </el-collapse-item>
<!-- <el-input style="width: 90%" size="small" placeholder="请输入使用计量层级标识"-->
<!-- disabled-->
<!-- v-model.trim="newProductData.useLevelUnit"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11" class="el-col">-->
<!-- <el-form-item label="流通时含计量单元数量:" prop="distributeLevelCount" label-width="160px">-->
<!-- <el-input style="width: 90%" size="small" placeholder="请输入流通时包含计量单元的数量"-->
<!-- v-model.trim="newProductData.distributeLevelCount"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11" class="el-col">-->
<!-- <el-form-item label="使用时含计量单元数量:" prop="useLeverCount" label-width="160px">-->
<!-- <el-input style="width: 90%" size="small" placeholder="请输入使用时包含计量单元的数量"-->
<!-- v-model.trim="newProductData.useLeverCount"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-collapse-item name="2">
<template slot="title">
<p class="form-title">单据处理设置</p>
</template>
<el-row :gutter="20">
<el-col :span="8" class="el-col">
<el-form-item label="待处理单据自动分配:" prop="autoAllotOrder" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoAllotOrder">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8" class="el-col">
<el-form-item label="单据自动完成:" prop="autoFinishOrder" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoFinishOrder">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="3">
<template slot="title">
<p class="form-title">单据上传设置</p>
</template>
<el-row :gutter="20">
<el-col :span="8" class="el-col">
<el-form-item label="已完成单据自动上传:" prop="autoUploadOrder" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoUploadOrder">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</el-form> </el-form>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { selectSysParamByKey ,systemParamConfigSave} from '@/api/param/systemParamConfig'
import {getSet, updateSet} from "@/api/collect/collectSet";
export default { export default {
name: 'timerSetting', name: 'timerSetting',
@ -86,30 +113,25 @@ export default {
formData: { formData: {
startDownloadTime: null startDownloadTime: null
}, },
systemParam:null, systemParam: null,
} }
}, },
methods: { methods: {
selectSysParam() { selectSysParam() {
let query = { getSet().then((response) => {
paramKey: 'startDownloadTime'
}
selectSysParamByKey(query).then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.formData.startDownloadTime = response.data.paramValue this.formData = response.data
this.systemParam = response.data
} }
}) })
}, },
save() { save() {
this.systemParam.paramValue = this.formData.startDownloadTime updateSet(this.formData)
systemParamConfigSave(this.systemParam, 'save')
.then((response) => { .then((response) => {
if (response.code != 20000) { if (response.code != 20000) {
this.$message.error(response.message); this.$message.error(response.message);
}else } else
this.$message.success("操作成功"); this.$message.success("操作成功");
}) })
.catch(() => { .catch(() => {
}); });

@ -62,7 +62,8 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 6px;margin-bottom: -6px;" v-if="this.formDataVisible != null && this.formDataVisible.scanType == 1"> <el-row style="margin-top: 6px;margin-bottom: -6px;"
v-if="this.formDataVisible != null && this.formDataVisible.scanType == 1">
<!-- <el-col :span="6">--> <!-- <el-col :span="6">-->
<!-- <el-form-item prop="workPlaceCode" class="query-form-item" label="当前工位:">--> <!-- <el-form-item prop="workPlaceCode" class="query-form-item" label="当前工位:">-->
<!-- <el-select--> <!-- <el-select-->
@ -127,7 +128,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<!-- :label="this.formDataVisible.unitTittle + ':'"--> <!-- :label="this.formDataVisible.unitTittle + ':'"-->
<el-form-item class="query-form-item" label="收货方"> <el-form-item class="query-form-item" label="收货方">
<el-select v-model="formData.fromCorp" <el-select v-model="formData.fromCorp"
filterable filterable
@ -1272,18 +1273,27 @@ export default {
if (str.startsWith("MA")) { if (str.startsWith("MA")) {
return true; return true;
} }
// 2. "01" 18 // 2. "01" 18
if (str.startsWith("01") && str.length >= 18) { if (str.startsWith("01") && str.length >= 18) {
return true; return true;
} }
// 3. "#" "#" 4 // 3. "#" "#" 4
if (str.startsWith("#") && (str.match(/#/g) || []).length >= 4) { if (str.startsWith("#") && (str.match(/#/g) || []).length >= 4) {
return true; return true;
} }
// 4. "8" 20 // 4. "8" 20
if (str.startsWith("8") && str.length === 20) { if (str.startsWith("8") && str.length === 20) {
return true; return true;
} }
// 5. "11", "17", "21", "10"
const prefixes = ["11", "17", "21", "10"];
if (prefixes.some(prefix => str.startsWith(prefix))) {
return true;
}
// false // false
return false; return false;
} }

Loading…
Cancel
Save