123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- <template>
- <div class="newApply pagePadding">
- 入库方审核
- {{ myType }}
- <div
- v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
- >
- <el-form
- :disabled="myType !== 2"
- :model="ruleForm"
- :rules="rules"
- ref="ruleForm"
- label-width="165px"
- >
- <el-form-item label="入库方审核状态" prop="stock_go_rule">
- <el-select
- v-model="value"
- placeholder="入库方审核"
- :size="searchSize"
- >
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <!-- 入库方审核备注 -->
- <el-form-item label="入库方审核备注" prop="stock_remark">
- <el-input
- type="textarea"
- :rows="2"
- style="width: 30%"
- placeholder="请输入审核备注"
- :size="searchSize"
- v-model="remark"
- clearable
- >
- </el-input>
- </el-form-item>
- <el-form-item>
- <el-col :span="24" style="text-align: right; margin-top: 10px">
- <el-button type="primary" @click="save" v-show="myType === 2"
- >保 存
- </el-button>
- <!-- <el-button type="warning" @click="submitForm"
- >保 存 并 发 起 流 程
- </el-button> -->
- </el-col>
- </el-form-item>
- </el-form>
- <add-edit
- :id="modelId"
- :sitem="sitem"
- :show-model="showModel"
- :is-detail="isDetail"
- @refresh="searchList"
- @cancel="showModel = false"
- />
- </div>
- <div v-else>
- <no-auth></no-auth>
- </div>
- </div>
- </template>
- <script>
- import mixinPage from "@/mixins/elPaginationHandle";
- import resToken from "@/mixins/resToken";
- import ExTable from "@/components/ExTableNew.vue";
- import statusList from "@/assets/js/statusList";
- // import asyncRequest from "@/apis/service/stock/newApply";
- import asyncRequest from "@/mock/service/stock/newApply";
- import addEdit from "./addEdit-newApply";
- import { mapGetters } from "vuex";
- export default {
- name: "allotFlow",
- mixins: [mixinPage, resToken],
- props: ["myType"],
- components: {
- addEdit,
- ExTable,
- },
- computed: {
- ...mapGetters(["tablebtnSize", "searchSize", "size"]),
- powers() {
- let tran =
- this.$store.getters.btnList.find(
- (item) => item.menu_route == "allotFlow"
- ) || {};
- if (tran && tran.action && tran.action.length > 0) {
- return tran.action;
- } else {
- return [];
- }
- },
- },
- data() {
- return {
- options: [
- {
- value: "选项1",
- label: "请选择入库方审核状态",
- },
- {
- value: "选项2",
- label: "通过",
- },
- {
- value: "选项3",
- label: "驳回",
- },
- ],
- value: "",
- // selectStock_in: "", //选择的入库仓库名称
- // selectStock_go: "", //选择的出库仓库名称
- // stock_go: "", //出库仓库name
- // stock_in: "", //入库仓库name
- // options: [], //用于渲染二级仓库名
- ruleForm: {},
- rules: {
- //出入库规则
- stock_go_rule: [
- {
- required: true,
- message: "请选择审核状态",
- trigger: "blur",
- },
- ],
- stock_remark: [
- {
- required: true,
- message: "请输入审核备注",
- trigger: "change",
- },
- ],
- },
- remark: "a",
- loading: true,
- showModel: false,
- isDetail: false,
- modelId: 0,
- tableData: [], //渲染表格
- //
- // 表格 - 数据
- tableData: [],
- // 表格 - 参数
- table: {
- stripe: true,
- border: true,
- // _defaultHeader_: ["setcol"],
- },
- // 表格 - 分页
- pageInfo: {
- size: 15,
- curr: 1,
- total: 0,
- },
- // 表格 - 列参数
- columns: [
- {
- prop: "nickname",
- label: "商品编号",
- },
- {
- prop: "role_name",
- label: "商品名称",
- },
- {
- prop: "mobile",
- label: "数量",
- },
- {
- prop: "",
- label: "操作",
- fixed: "right",
- _noset_: true,
- _slot_: "operation",
- },
- ],
- // sitem: null,
- // // 状态
- // statusOptions: [
- // { id: "0", label: "禁用" },
- // { id: "1", label: "启用" },
- // ],
- parmValue: {
- //入参
- // name: "", // 业务员名字
- // username: "", // 账号
- // status: "", //
- // page: 1, // 页码
- // size: 15, // 每页显示条数
- },
- // passwordModel: false,
- // passwordModelId: 0,
- // isPasswordDetail: false,
- // statusList: statusList,
- };
- },
- mounted() {
- this.searchList();
- // this.stockName(); //假数据,获取二级仓库名
- },
- methods: {
- restSearch() {
- //重置入参
- this.parmValue = {};
- this.searchList();
- },
- openModal(id, isDetail, sitem) {
- this.showModel = true;
- this.modelId = id;
- this.isDetail = isDetail;
- this.sitem = sitem;
- },
- async deleteById(id, status) {
- // await this.$confirm("确定要删除?", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning",
- // })
- // .then(async () => {
- // const model = {
- // id: id,
- // status: status === "1" ? "0" : "1",
- // };
- // const res = await asyncRequest.status(model);
- // if (res && res.code === 0) {
- // this.$notify.success({
- // title: "删除成功",
- // message: "",
- // });
- // this.searchList();
- // } else if (res && res.code >= 100 && res.code <= 104) {
- // await this.logout();
- // } else {
- // this.$message.warning(res.message);
- // }
- // })
- // .catch(() => {
- // console.log("取消");
- // });
- },
- async searchList() {
- // this.loading = true;
- // const res = await asyncRequest.list(this.parmValue);
- // if (res && res.code === 0 && res.data) {
- // this.tableData = res.data.list;
- // this.pageInfo.total = Number(res.data.count);
- // } else if (res && res.code >= 100 && res.code <= 104) {
- // await this.logout();
- // } else {
- // this.tableData = [];
- // this.pageInfo.total = 0;
- // }
- // this.loading = false;
- },
- async statusConfirm(id, status) {
- // let str = status === "1" ? "禁用" : "启用";
- // await this.$confirm("确定要改为" + str + "?", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning",
- // })
- // .then(async () => {
- // this.loading = true;
- // const model = {
- // id: id,
- // status: status === "1" ? "0" : "1",
- // };
- // const res = await asyncRequest.status(model);
- // if (res && res.code === 0) {
- // this.loading = false;
- // this.$notify.success({
- // title: "状态修改成功!",
- // message: "",
- // });
- // await this.searchList();
- // } else if (res && res.code >= 100 && res.code <= 104) {
- // await this.logout();
- // } else {
- // this.$message.warning(res.message);
- // }
- // })
- // .catch(() => {
- // console.log("取消");
- // });
- },
- compareStock() {
- //比较出库仓库和入库仓库是否相同
- if (
- this.stock_go === this.stock_in &&
- this.stock_go !== "" &&
- this.stock_go != ""
- ) {
- console.log("出库仓库和入库仓库相同");
- this.$message({
- message: "出库仓库不能和入库仓库相同",
- type: "error",
- });
- }
- },
- },
- };
- </script>
- <style lang="scss" >
- .newApply {
- }
- .el-form-item__content {
- margin: 0 !important;
- }
- </style>
-
|