init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!--[1.9.4]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/layui/css/layui.css"/>
|
||||
<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/jquery/js/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form class="layui-form" action="" method="" lay-filter="example">
|
||||
<div class="layui-form-item" style="margin-top: 20px;">
|
||||
<label class="layui-form-label" style="width: 100px;">预警时间:</label>
|
||||
<div class="layui-input-inline" style="display: flex;align-items: center">
|
||||
<input type="text" name="warning" id="warning" lay-verify="warning" autocomplete="off" class="layui-input"
|
||||
value="{$warning}">
|
||||
<span style="color: black;padding-left: 10px">天</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-left: 130px;color: #999">设置商品过期预警时间(默认一天)</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" style="margin-left: 130px;margin-top: 20px">
|
||||
<input type="button" id="_button" class="layui-btn" value="立即提交" lay-filter="formDemoPane">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
layui.use(['form'], function () {
|
||||
var form = layui.form
|
||||
|
||||
//监听提交
|
||||
form.on('submit(demo)', function (data) {
|
||||
layer.msg(JSON.stringify(data.field));
|
||||
return false;
|
||||
});
|
||||
$('#_button').click(function () {
|
||||
var warning = $('#warning').val();
|
||||
if (warning < 1) {
|
||||
warning = 1;
|
||||
}
|
||||
var storeid = {$storeid};
|
||||
$.ajax({
|
||||
url: "{:U('Past/create_warning')}",
|
||||
type: "POST",
|
||||
data: {warning: warning, storeid: storeid},
|
||||
success: function (res) {
|
||||
// console.log(res);
|
||||
if (res.status == 1) {
|
||||
layer.msg(res.msg, {icon: 1, time: 2000}, function () {
|
||||
parent.layer.closeAll();
|
||||
})
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2, time: 2000}, function () {
|
||||
parent.layer.closeAll();
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,93 @@
|
||||
<!--[1.9.15]-->
|
||||
<div id="pastApp">
|
||||
<el-form inline size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.keyword" @keydown.enter.exact.native.prevent="handleCurrentChange(1)"
|
||||
placeholder="商品名称/货号/条码">
|
||||
<template slot="append">
|
||||
<i @click="handleCurrentChange(1)" class="el-icon-search"></i>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<if condition="$authArr['addWarning'] eq true">
|
||||
<el-button @click="addWarning" type="primary">预警设置</el-button>
|
||||
</if>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table border :header-cell-style="{background:'#F5F7FA',color:'#606266'}"
|
||||
:data="dataList" size="small" :stripe="true" max-height="670">
|
||||
<el-table-column align="center" fixed type="index" label="序号" width="50"></el-table-column>
|
||||
<el-table-column align="center" prop="goods_name" label="商品名称"></el-table-column>
|
||||
<el-table-column align="center" prop="sku_name" label="规格名称"></el-table-column>
|
||||
<el-table-column align="center" prop="goods_number" label="商品货号"></el-table-column>
|
||||
<el-table-column align="center" prop="goods_code" label="商品条码"></el-table-column>
|
||||
<el-table-column align="center" prop="company" label="单位"></el-table-column>
|
||||
<el-table-column align="center" prop="build_date" label="生产日期"></el-table-column>
|
||||
<el-table-column align="center" prop="quality_guarantee_period" label="保质期(天)"></el-table-column>
|
||||
<el-table-column align="center" prop="warehouse_price" label="入库价(元)" v-if="storeAuth.showpurch_price"></el-table-column>
|
||||
<el-table-column align="center" prop="warehouse_num" label="入库数量"></el-table-column>
|
||||
<el-table-column align="center" prop="surplus_num" label="剩余数量"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="searchForm.page"
|
||||
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100]" :page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<script>
|
||||
var pastApp = new Vue({
|
||||
el: '#pastApp',
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
keyword: '',
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
count: 0,
|
||||
dataList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addWarning() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
content: "{:U('Past/addWarning')}",
|
||||
title: "预警时间设置",
|
||||
area: ["40%", "30%"],
|
||||
btnAlign: 'c',
|
||||
end: () => {
|
||||
this.getData();
|
||||
}
|
||||
})
|
||||
},
|
||||
//切换每页数量
|
||||
handleSizeChange(val) {
|
||||
this.searchForm.limit = val;
|
||||
this.searchForm.page = 1;
|
||||
this.getData();
|
||||
},
|
||||
//切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchForm.page = val;
|
||||
this.getData();
|
||||
},
|
||||
getData() {
|
||||
this.sendRequest('Retail/Past/getWarningGoods', {
|
||||
data: this.searchForm,
|
||||
success: (res) => {
|
||||
if (res.status == 1) {
|
||||
this.dataList = res.data.list;
|
||||
this.count = res.data.count;
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.getData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
在新工单中引用
屏蔽一个用户