zhc4dev
wangjiadong 2 years ago
parent 091160fe88
commit a72f32a8a2
  1. 18
      ant-design-vue-jeecg/src/views/delivery/DeliveryList.vue
  2. 52
      ant-design-vue-jeecg/src/views/delivery/modules/DeliveryForm.vue
  3. 10
      ant-design-vue-jeecg/src/views/delivery/modules/DeliveryForm1.vue
  4. 29
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/controller/DeliveryController.java
  5. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/delivery/entity/Delivery.java

@ -97,6 +97,8 @@
<span slot="action" slot-scope="text, record">
<a @click="qdck(record)">确定出库</a>
<a-divider type="vertical" />
<a @click="cxck(record)">撤销出库</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
@ -130,6 +132,7 @@
import DeliveryModal from './modules/DeliveryModal'
import DeliveryModal1 from './modules/DeliveryModal1'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction } from '../../api/manage'
export default {
name: 'DeliveryList',
@ -201,6 +204,11 @@
align:"center",
dataIndex: 'adminId_dictText'
},
{
title:'出库状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title: '操作',
dataIndex: 'action',
@ -211,6 +219,7 @@
}
],
url: {
cxck: "/delivery/delivery/cxck",
list: "/delivery/delivery/list",
delete: "/delivery/delivery/delete",
deleteBatch: "/delivery/delivery/deleteBatch",
@ -231,6 +240,15 @@
},
},
methods: {
cxck(record){
getAction(this.url.cxck,{ id: record.id}).then((res)=>{
if(res.success){
this.loadData(1);
}else{
that.$message.warning(res.message);
}
})
},
qdck: function (record) {
this.$refs.modalFormqdck.edit(record);
this.$refs.modalFormqdck.title = "确定出库";

@ -3,19 +3,16 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="storehouseId">
<j-search-select-tag v-model="model.storehouseId" dict="starehouse,name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物品类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemType">
<j-dict-select-tag type="list" v-model="model.itemType" dictCode="goods_category" placeholder="请选择物品类型" />
<j-dict-select-tag type="list" :disabled ="model.state !=='1' ? false:true" v-model="model.itemType" dictCode="goods_category" placeholder="请选择物品类型" />
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="this.model.itemType==1">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
:disabled ="model.state !=='1' ? false:true"
v-model="model.itemCode"
field="itemCode"
org-fields="fabric_number"
@ -31,6 +28,7 @@
<a-col :span="24" v-if="this.model.itemType==2">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
:disabled ="model.state !=='1' ? false:true"
v-model="model.itemCode"
field="itemCode"
org-fields="nums"
@ -47,6 +45,7 @@
<a-col :span="24" v-if="this.model.itemType==3">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
:disabled ="model.state !=='1' ? false:true"
v-model="model.itemCode"
field="itemCode"
org-fields="code"
@ -62,6 +61,7 @@
<a-col :span="24" v-if="this.model.itemType==4">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
:disabled ="model.state !=='1' ? false:true"
v-model="model.itemCode"
field="itemCode"
org-fields="nums"
@ -77,6 +77,7 @@
<a-col :span="24" v-if="this.model.itemType==5">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
:disabled ="model.state !=='1' ? false:true"
v-model="model.itemCode"
field="itemCode"
org-fields="goods_code"
@ -89,42 +90,25 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="用量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
<a-input v-model="model.amount" placeholder="请输入用量" ></a-input>
<a-input :disabled ="model.state !=='1' ? false:true" v-model="model.amount" placeholder="请输入用量" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-input v-model="model.unit" placeholder="请输入单位" ></a-input>
<a-input :disabled ="model.state !=='1' ? false:true" v-model="model.unit" placeholder="请输入单位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="出库原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryReason">
<j-dict-select-tag type="radio" v-model="model.deliveryReason" dictCode="scjc" placeholder="请选择出库原因" />
<j-dict-select-tag type="radio" :disabled ="model.state !=='1' ? false:true" v-model="model.deliveryReason" dictCode="scjc" placeholder="请选择出库原因" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="出库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<j-date placeholder="请选择出库时间" v-model="model.deliveryTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="取货人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carrierId">
<j-select-user-by-dep v-model="model.carrierId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="管理员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminName">
<j-popup
v-model="model.adminName"
field="adminName"
org-fields="id,realname"
dest-fields="adminId,adminName"
code="findck"
:multi="true"
@input="popupCallback"
/>
<j-date placeholder="请选择出库时间" :disabled ="model.state !=='1' ? false:true" v-model="model.deliveryTime" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
@ -167,9 +151,7 @@
amount: [
{ required: true, message: '请输入用量!'},
],
storehouseId: [
{ required: true, message: '请输入仓库!'},
],
itemType: [
{ required: true, message: '请输入物品类型!'},
],
@ -179,12 +161,8 @@
deliveryTime: [
{ required: true, message: '请输入出库时间!'},
],
carrierId: [
{ required: true, message: '请输入取货人!'},
],
adminName: [
{ required: true, message: '请输入管理员!'},
],
},
url: {
add: "/delivery/delivery/add",

@ -5,17 +5,18 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="storehouseId">
<j-search-select-tag v-model="model.storehouseId" dict="starehouse,name,id" />
<j-search-select-tag :disabled ="model.state !=='1' ? false:true" v-model="model.storehouseId" dict="starehouse,name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="取货人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carrierId">
<j-select-user-by-dep v-model="model.carrierId" />
<j-select-user-by-dep :disabled ="model.state !=='1' ? false:true" v-model="model.carrierId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="管理员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminName">
<j-popup
:disabled ="model.state !=='1' ? false:true"
v-model="model.adminName"
field="adminName"
org-fields="id,realname"
@ -29,10 +30,6 @@
</a-row>
</a-form-model>
</j-form-container>
一旦确定将无法编辑修改
</a-spin>
</template>
@ -56,6 +53,7 @@
data () {
return {
model:{
state :"0",
itemType :"1",
deliveryReason : "0"
},

@ -137,6 +137,35 @@ public class DeliveryController extends JeecgController<Delivery, IDeliveryServi
}
/**
* 编辑
*
* @param delivery
* @return
*/
@AutoLog(value = "出库表-编辑")
@ApiOperation(value="出库表-编辑", notes="出库表-编辑")
@PutMapping(value = "/edit1")
public Result<?> edit1(@RequestBody Delivery delivery) {
delivery.setStatus("1");
deliveryService.updateById(delivery);
return Result.OK("编辑成功!");
}
//重新上线cxsx
@AutoLog(value = "专利列表-重新上线")
@ApiOperation(value="专利列表-重新上线", notes="专利列表-重新上线")
@RequestMapping(value = "/cxck")
public Result<?> cxck(@RequestParam(name="id",required=true) String id) {
Delivery delivery = new Delivery();
delivery.setId(id);
delivery.setStatus("2");
deliveryService.updateById(delivery);
return Result.OK("ok!");
}
/**
* 通过id删除
*

@ -103,4 +103,10 @@ public class Delivery implements Serializable {
@Excel(name = "管理员", width = 15)
@ApiModelProperty(value = "管理员")
private String adminName;
/**出库状态*/
@Excel(name = "出库状态", width = 15, dicCode = "ckzt")
@Dict(dicCode = "ckzt")
@ApiModelProperty(value = "出库状态")
private java.lang.String status;
}

Loading…
Cancel
Save