123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <template>
- <view>
- <form @submit="updata">
- <view class="body">
- 更换原因:<textarea class="input-two" name="replaceReason" />
- </view>
- <view class="">
- <button type="primary" formType="submit" class="button">
- <p class="p">提交</p>
- </button>
- </view>
-
- </form>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapActions,
- mapMutations
- } from 'vuex'
- export default {
- data() {
- return {
-
- }
- },
- methods: {
- updata(event) {
- var serverUrl = this.serverurl;
- const {
- value: modules
- } = event.detail;
- var token = uni.getStorageSync("token");
- var coding = uni.getStorageSync("updateModules");
- var machineCoding = uni.getStorageSync("updateMachineCode");
- var personnel = uni.getStorageSync("name");
- uni.request({
- url: serverUrl + "/TModules/updateModules",
- method: "POST",
- data: {
- "replaceReason": modules.replaceReason,
- "coding": coding,
- "machineCoding": machineCoding,
- "replacePersonnel": personnel
- },
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == true) {
-
- }
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- });
-
- },
- }
- }
- </script>
- <style>
- .body {
- background-color: #FFFFFF;
- padding: 20upx 25upx 20upx 20upx;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- }
- .input-two{
- padding-left: 20upx;
- width: 450upx;
- box-shadow: 0upx 0upx 20upx #D3D3D3;
- border-radius: 5upx;
- }
- .button {
- margin: auto;
- width: 60%;
- height: 100upx;
- }
- .p {
- /* #ifdef H5 */
- top: -13%;
- /* #endif */
- width: 80upx;
- height: 60upx;
- font-size: 40upx;
- padding-top: 6upx;
- /* #ifndef H5 */
- padding-top: 10upx;
- /* #endif */
-
- position: absolute;
- /* 水平居中 */
- left: 50%;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
- }
- </style>
|